Reputation: 75
I have created a simple Dax showing the month of each date in my data, however when adding Slicer into Report Dashboard, it shows the months alphabetically rather than by month (Jan, Feb, Mar) Etc.
Do I need to add more to my Dax to tell Power Bi how I would like the result laid out?
Month = AW_Calendar_Lookup[Date].[Month]
Upvotes: 0
Views: 2830
Reputation: 75
I managed to sort this how I wanted by using date column and selecting date hierarchy. I think I just tried to be too smart with what I was trying.
Upvotes: 0
Reputation: 349
If there is a MonthNumber-like column in your table just go to Data pane, select Month column and choose Sort by column
- MonthNumber in horizontal menu.
If you don't have such column, create another table, for example, using Enter data
in horizontal menu:
month | monthNumber |
---|---|
January | 1 |
February | 2 |
March | ... |
and create a relationship in Model pane between two Month columns.
Then make the same sorting as mentioned above within new table and use this table's Month column instead of original Month column in your visualizations.
Unfortunately, there is no other way to tell Power BI the sorting order for month names.
Upvotes: 1