Rules / Formatting

Month (as a string) must be sorted

warning MONTH_(AS_A_STRING)_MUST_BE_SORTED · ported · scope: Column, CalculatedColumn, CalculatedTableColumn

What it checks

Text columns with month in the name, but not months, that have no sort-by column.

Why it matters

A text month sorts alphabetically: April, August, December. Every axis and slicer that uses the column shows that order until someone notices, and the fix has to be repeated in each visual unless it is made once on the column.

How to fix it

Add a month number column, then in Power BI Desktop select the month name column and set Sort by column under Column tools to the number. In the TMDL file the property is sortByColumn: 'Month Number' under the column.

Quirks

Links

Check a model for this Improve this page