An example of a dimension that usually will need to be changed, is the Month dimension.
As we saw previously, two of the columns in the PeriodTable is called MonthName and MonthNumber. Monthname contain strings like ‘January, February, March … December.’, while MonthNumber contains values like ‘1, 2, 3 … 12’.
The end-users would like to see the full month names ‘January, February, March etc.’, but if the dimension was defined by the MonthName column alone, you would get problems with the sorting order, e.g. resulting in ‘April’ and ‘August’ becoming the first two months (because of alphabetical sort order).
The standard solution for the month sorting issue, is to work with properties for the MonthName attribute:
- Add MonthName as a dimension to the Shared dimensions folder.
- Go to the ‘Keycolumn’ property and change it to MonthNumber.
- Change the ‘Order by’ property to ByKey.
In this way, your Month dimension will ordered by Month numbers 1 through 12, but the end-user will see Month names January through December (as defined by the ‘Namecolumn’ property).
Please sign in to leave a comment.