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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MRUry7
Resolver II
Resolver II

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

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



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?

 



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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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