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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Trying to Summarize and Rank the results

Hi, I'm trying to rank my items in the first 2 columns by the result position, so i can get a count of how many times an item in the query column was found in results position1, 2, etc.
Very easy in excel, very challenging for me in PowerBi.  Can some help me with finding a solution to this? The query column is an item from a slicer that the user chooses.
In the example below, the detail is on the left two columns and the results are on the right if a user chooses Item1, Item2, etc.

MRUry7_3-1696940145249.png

 

Any help is appreciated.
Thank you 
Steven

 




1 ACCEPTED SOLUTION
Anonymous
Not applicable

Thanks very much. It worked and I was able to adapt it for other measures

View solution in original post

4 REPLIES 4
mh2587
Super User
Super User

Please accept my solution if it helps you


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



mh2587
Super User
Super User

Item Rank = 
RANKX(
    FILTER(
        YourTableName,
        YourTableName[Query Column] = SELECTEDVALUE(QuerySlicer[Item])
    ),
    YourTableName[Result Position]
)

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Anonymous
Not applicable

Hi, and thanks for your help. When a user chooses something, that's pretty easy.  But what if you just want to rank values in a table, something like this?

MRUry7_1-1697550942236.png

Is there a way to do this without having to use the SUMMARIZE function, to create a new table?

 



Anonymous
Not applicable

Thanks very much. It worked and I was able to adapt it for other measures

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.