Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Kai23
New Member

Top by Top Matrix Table in PowerBI

Hi all, I have been trying to create a Top by Top Matrix table in PowerBI, but I'm not sure how i can do it.
(1) I am unable to use more than 1 top n filter in a matrix table. In the screenshot, I have already applied top 10 to the columns, but I can't add another one for the rows.
(2) I can't sort the columns by the grand total, it is currently alphabetically sorted.

Kai23_0-1695095066265.png
This is the expected table I am looking for:

Kai23_1-1695095194564.png

 

 

4 REPLIES 4
CoreyP
Solution Sage
Solution Sage

You can use RANKX to rank each of the column values. Then sort the column field by this new rank column, then it should sort them correctly and you won't need a top N for columns, only for the rows. 

Hi CoreyP, Thank you for the suggestion, I tried to use RankX but I'm not familiar with it, and the rank is showing 1 for all of them, and I can't figure out why its not working.

Rank = RANKX(Sheet1,SUM(Sheet1[Quantity]),,DESC,DENSE)

Kai23_0-1695103995435.png

 

You need to remove context, use ALL().

Do you mean I should do this? 

Rank = RANKX(ALL(Sheet1),SUM(Sheet1[Quantity]),,DESC,DENSE)

Kai23_0-1695104981498.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.