Posts

Showing posts with the label Tabular model

SSAS tabular: Implement createOrReplace batch using sequence with TSML json

This is a sample of how you would create and assign members to three roles for your tabular cube using TSML json script. To execute, open new query connection to your ssas tabular server in management studio, then execute The example in msdn has an extra, invalid bracket set, after "sequence": which fails the script. It has been removed in my working sample below   {   "sequence": {     "operations": [       {         "createOrReplace": {           "object": {             "database": "YourTabularCubeName",             "role": "Admin"           },           "role": {             "name...

Get related measure without sumx

To create a measure (RelatedSales) in a filtered spine/factless table (ManySideTableThatIsFiltered), that relates to another table containing a measurable field (SalesAmount) RelatedSales :=  calculate ( sum ( [SalesAmount] ) ,  values ( ManySideTableThatIsFiltered ) )

Where did my measure go?

Image
In SSAS Tabular 2012, I created a measure from the aggregation button (sum) for a column, say Sales, and then the measure doesn't show up in the measuregrid. I can see the measure with the name Sum of Sales in the properties window. When I select it from here an empty cell is automatically selected. But I cannot see the formula nor delete the measure. If i browse the source code of the bim-file i see the measure here too. When I try creating a measure manually with the same name I get the error "An item with the same key has already been added" The reason was that I had a perspective selected that was not including the entire table I was working with. When using the quick-button (sum) for creating a measure, the measure isn't added to the perspective and therefore hidden. One may think that creating measures when using a perspective, they should be added to that perspective. And it actually does when writing the measure formula manually. It's just the...