Sorting Month Names Chronologically in Microsoft Power BI Reports
Often times, in Power BI, you’re adding dates to your reports and would prefer to use the more formal month name rather than the month number. After all, it can give your reports a more polished look. Trouble is, Month Name fields are text fields, and therefore Power BI has no choice but to sort them alphabetically. I mean, who wouldn’t want their date sorted by April, then August, then December, then February, right? Well, there’s a trick that will let you sort dates the way they should be sorted, whether you’re using the month name or number.
For the sake of the exercise, let’s create a date table in Power BI Desktop.
Go to Modeling, New Table
Replace “Table = “ with the following code to create a table called “Date”:
CALENDAR (DATE(2000,1,1), DATE(2025,12,31)),
“DateAsInteger”, FORMAT (