March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hello,
I am real familure with DAX and Power Query in Excel, but fairly new to Power BI. I have searched the forums and found many issues on the topic, but I still cannot get it to work.
I am trying to create a matrix visual where the column headers are in descending order, but it is not working. Here is what I did:
As you can see, the date is in the incorrect order. Here is what I did to try to get it to work.
I created a calculated column showing the reporting month:
Here is the formula used:
2. I sorted the "End of Month" Field in descending order:
3. I added an index column from 0 in increments of 1 and named it "Desc Sort Order."
4. I expanded the table and loaded and closed. Here is what it looks like.
On the Calendar table, I took the "Month for Reporting - Desc" field and applied the "Sort by column" to the "Desc Sort Order" field.
The data does not populate correctly.
When I use my other "Month for Reporting" field with sort applied to a different column, it works correctly in ascending order.
I feel like I am going crazy because I applied the same logic to the descending report, but it is not working.
Do you all have any other suggestions to get this sorted in the correct order?
Appreciate your response.
Casey
Solved! Go to Solution.
Thank you both for responding. I cleared all the confidential data and was going to add a sample pbix file, but then it worked! I rebuilt the matrix visual without changing anything and it is working properly now. Strange, but I am glad it is working now.
Hi @CaseyM ,
If you want to change the order of the month. You can use sort by column function to sort your month as you want. Only import a table with unique month and an index column. Then create a relationship between these tables.
For example, you want let apr'22 as the 1st one and jan'22 as the 2nd... refer [index2], then sort [month] by index2.
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you both for responding. I cleared all the confidential data and was going to add a sample pbix file, but then it worked! I rebuilt the matrix visual without changing anything and it is working properly now. Strange, but I am glad it is working now.
Hi,
Not sure, what is in your Date Dim,
But you could add the Month number column in your Date Dim as below :
Hi,
What do you mean by descending order of month? Please be clear. Also, share the download link of your PBI file.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
164 | |
116 | |
63 | |
57 | |
50 |