Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
In a matrix, I need the numbers to be ordered from the highest to the lowest, that the current day is always the first from left to right. how can I do this?
I'm using a calendar table relating to the original date
Today is like that:
Solved! Go to Solution.
Hi @CastroRibeiro
You can achieve it with 2 manipulations on your date table:
1. Duplicate "Day" column:
2. Add a column for Descending sorting:
Sort your new day column by this ranking :
Result:
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi @CastroRibeiro
You can achieve it with 2 manipulations on your date table:
1. Duplicate "Day" column:
2. Add a column for Descending sorting:
Sort your new day column by this ranking :
Result:
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly
Hi Rita!
I just ran into this problem today and found out that your solution is the best one published online
So I had an urge to improve it 🙂
Issue: your solution orders days in descending order but keeps months and years in ascending order
Offered solution: Add the following custom column in the Edit Query screen (M Language), define it as "Whole number" and then sort it in the desired order (steps 2 & 3 on your example):
- Duration.Days([DateField] - #datetime(1970, 1, 1, 0, 0, 0))*86400
Note the dash - minus sign is significant! it creates a Unix timestamp, simply a date stored as an integer, making it easy to order.
p.s
your contribution is amazing and I joined some of your groups 🙂
Thank you so much for the kind words, I’m really excited to hear that!😊
Regarding the excellent professional comment - you're absolutely right, and of course, this logic can be implemented at any level of granularity required. I think I’ve already prepared about 5 different variations of it floating around here in the forum.
As for the groups, I'm glad to hear that! I hope you manage well with the content being mainly in Hebrew. Aside from what’s written here and on the blog, that's the main language I operate in.
Thank you again, and have a wonderful day!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 69 | |
| 47 | |
| 44 | |
| 28 | |
| 19 |
| User | Count |
|---|---|
| 199 | |
| 129 | |
| 102 | |
| 69 | |
| 55 |