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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
HB13
Helper I
Helper I

RANKX with multiple row/categories in a matrix

Hello Everyone

I have a matrix set up with 3 "Row" (Category) columns and a single ratio value. The categories are all from the same table.

e.g 
Category 1          Category 2           Category 3          Value
     ABC                     ABC_1                    001                 12%
     DEF                      DEF_3                    003                 52%   

                                 DEF_8                    008                  -2%     etc 

 

How do I create a measure that allows me to filter this matrix for the top 20 largest %'s 

I tried the following DAX code with all three categories, but it's not working. It makes all the ranks 1 or 2 nonsensically;

IF ( 
     ISINSCOPETable[Category 3] ),
     RANKX ( CALCULATETABLE ( VALUES ( Table[Category 3] ), ALLSELECTED ( Table[Category 3] ), Measure[Value]DESC)
     )
 
Please advise what changes to make to this measure!

Many many thanks!
 
2 REPLIES 2
Jeanxyz
Impactful Individual
Impactful Individual

Do you want to rank by Value %? I assume you have created a measure to show the Value%? In that case, you can drag that measure into the filter pane. In my example, I only want to show Top 10 projects by Net Invoiced Value amount , so I just drag  Net Value Invoice_EUE(M) measure into the filter pane. 

top10 filter.PNG

 

 

lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. I cannot use screenshots of your source data.

Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors