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
Anonymous
Not applicable

Finding the Rank based on 2 Slicers

Hi there,

 

I hope I can explain myself properly here...

 

I have 2 slicers on my page that is pulling the same data. One is single select and one is multiple select.  This allows me to run comparisons of one person to the averages of some selected contemporaries.

 

An example of this is using one card showing the number of phone calls answered within a selected time frame and another card showing the average across a select group of people.

 

Two Slicers.PNG

 

What I now need is to show where that one person (1st slicer) ranks in the list of individual achievements from the selected people in the 2nd slicer.

 

Any assistance would be awesome!!

 

Thanks

Peter

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Peter_Lithgow,

 

Please check following steps as below and see if the result achieve your exception:

1. Create calculated table:

    name = DISTINCT('scores'[name])

2. Create measures:

    sum = SUM(scores[scores])

    rank_selected =

    var select_name = SELECTEDVALUE('name'[name],BLANK())

    var select_rank = RANKX(ALLSELECTED(scores[name]),[sum],,DESC)

    return

    IF(select_name = MAX(scores[name]),select_rank,BLANK())

3. Result would be shown as below:

1.PNG

2.PNG

BTW, Pbix as attached. Hopefully works for you.

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

2 REPLIES 2
v-jayw-msft
Community Support
Community Support

Hi @Peter_Lithgow,

 

Please check following steps as below and see if the result achieve your exception:

1. Create calculated table:

    name = DISTINCT('scores'[name])

2. Create measures:

    sum = SUM(scores[scores])

    rank_selected =

    var select_name = SELECTEDVALUE('name'[name],BLANK())

    var select_rank = RANKX(ALLSELECTED(scores[name]),[sum],,DESC)

    return

    IF(select_name = MAX(scores[name]),select_rank,BLANK())

3. Result would be shown as below:

1.PNG

2.PNG

BTW, Pbix as attached. Hopefully works for you.

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
Anonymous
Not applicable

@v-jayw-msft - you ripper!!  This is exactly what I was wanting to do.  Thank you so very much!

 

Peter

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.