In this example, a DAX calculated column is created to support sorting of the Calendar Yr-Mo column.
- Access the Date table in Data view and click on New Column from the Modeling tab.
- Enter the following DAX expression to create sorting column at the grain of calendar months across years:
- The YEAR() function is applied against the Date column and multiplied by 100 to add two digits:
- MONTH() returns a value of 1 to 12 and this is added to the six digit number