Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Everyone,
I have a matrix visualization which shows periods across the top and $ values (see below). I need to sort the list of Top N brands by the last column. As you can see, Brand #3 should be on the top row if sorted correctly.
In my source data, I have columns for brand, period, $, and a period sort (a conditional if column used to sort the headers below in the correct order). I also have a conditional column which pulls over Latest 52 Wk $ data which I created hoping that I could sort there and get the brands in the correct order.
Thanks in advance for suggestions,
LF
Solved! Go to Solution.
Hi @littlefox
Here is a workaround
Create a calculated column
rank = IF([period]="last51-5",RANKX(FILTER(ALL(Sheet1),[period]="last51-5"),[$ values],,DESC,Dense))
Add "rank" column to "Value" Field of the matrix.
Sort by "Rank"column
Best Regards
Maggie
Another way to approach this is discussed in this blog post:
https://affinityworks.co.uk/power-bi-matrix-column-sort-sorted/
Hi @littlefox
Here is a workaround
Create a calculated column
rank = IF([period]="last51-5",RANKX(FILTER(ALL(Sheet1),[period]="last51-5"),[$ values],,DESC,Dense))
Add "rank" column to "Value" Field of the matrix.
Sort by "Rank"column
Best Regards
Maggie
Please follow the setps in below image.
User | Count |
---|---|
77 | |
76 | |
44 | |
31 | |
26 |
User | Count |
---|---|
97 | |
89 | |
52 | |
48 | |
46 |