If you created a Tabular model using one of the preview versions (CTP, RC, …) of Analysis Services 2019, you don’t have the final structure for the Ordinal attribute that Microsoft defined in the final version of compatibility level 1500.
A calculation group is like a table in the Tabular model and a calculation item is a value in a column of the table defined for the calculation group. In order to sort the calculation item there is an additional column called Ordinal used to manage the “Sort by Column” behavior, like any other column of a Tabular model. Even though the Ordinal column is not mandatory, it is required in order to make the custom ordering work – without the column Ordinal, the calculation item will be displayed in in alphabetical sort order regardless of the Ordinal property of the calculation item.
Tabular editor automatically creates the Ordinal column in a new calculation group. If you don’t have the Ordinal column in the calculation group because you created the model using a previous version of Tabular Editor, you can fix the model using Tabular Editor 2.9.1 by doing the following:
- Right-click the calc group table > Create New > Data Column
- Set the Source Column property to “Ordinal”
- Set the Data Type property to “Integer / Whole Number (int64)”
- Optionally make the column Ordinal invisible (right-click / Make Invisible)
- Click the column of the corresponding calculation item
- Set the Sort By Column property to “Ordinal”
After that, you can set the Ordinal property of the calculation items by directly assigning a value to that property for each calculation item, or by moving the sort order of calculation items in the calculation group using drag & drop. This way, Tabular Editor automatically adjusts the Order property so that it reflects the desired order of the column.