Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have the following Matrix :
My measure is like below :
How can I sort the matrix based on the CalendarMonthNumber and displaying only the CalendarMonthLabel ?
Solved! Go to Solution.
Hi @BedhiafiAmira
As I saw, your month now sort as per Alphabetic order
So you need to create a calculated column in your DimDate table, please change DAX as per your month column name
MONTH_SORT =
Switch(
True(),
Month = "January",1,
Month = "February",2,
Month = "March",3,
Month = "April",4,
Month = "May",5,
Month = "June",6,
Month = "July",7,
Month = "August",8,
Month = "September",9,
Month = "October",10,
Month = "November",11,
Month = "December",12)
I used calendar month scquence, if your year start from June, so you need to put June as 1
Then click on your MONTH column and select SORT_MONTH column
Now click on table matrix visual change sory by month column
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos
Proud to be a Super User! | |
Hi @BedhiafiAmira
As I saw, your month now sort as per Alphabetic order
So you need to create a calculated column in your DimDate table, please change DAX as per your month column name
MONTH_SORT =
Switch(
True(),
Month = "January",1,
Month = "February",2,
Month = "March",3,
Month = "April",4,
Month = "May",5,
Month = "June",6,
Month = "July",7,
Month = "August",8,
Month = "September",9,
Month = "October",10,
Month = "November",11,
Month = "December",12)
I used calendar month scquence, if your year start from June, so you need to put June as 1
Then click on your MONTH column and select SORT_MONTH column
Now click on table matrix visual change sory by month column
If solve your requirement, please mark this answer as SOLUTION
If this comment helps you, please LIKE this comment/Kudos
Proud to be a Super User! | |
I had to use another calculated column :
I am getting a circular dependency when I try to sort the month by the calculated column.
from the table view select the month label column and click on "sort by column". From the drop down list select "month number".
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
71 | |
56 | |
39 | |
35 |
User | Count |
---|---|
66 | |
66 | |
59 | |
53 | |
45 |