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

Shows rank in visual, selecting filter

Hey all,

 

I have created a rank measure which shows me the rank for each customer. Now I am creating a Dashboard where I am able to select the month and the customer and I want the visual to show HIS particular rank for this month. I think I have to add something with filter or selected value but do not know how. This is my rank formula: 

 

Rank = 
RANKX ( ALLSELECTED ( Jahr_Plan[Counter] ), CALCULATE ( [SO/Tag 2020] ) ) 

 

 

At the moment it shows me the Total of all ranks:

 

Rank_Select.png

10 REPLIES 10
v-easonf-msft
Community Support
Community Support

Hi ,  @Anonymous 

Whether there is anything  wrong  with the interaction  between the visualization?

Can you share  the formula of the measure  [SO/Tag 2020] ?


Best Regards,
Community Support Team _ Eason

 

Anonymous
Not applicable

@v-easonf-msft 

 

It is a simple divide formula:

SO/Tag 2020 = divide(sum(Jahr_Plan[SO20]),sum(Jahr_Plan[Besetzte Tage 2020]), blank())
 
--> What I think is that the visual gives me the result of the total of the matrix (7) and not the specific rank of the row I selected.
 
Rank_Select.png

Hi , @Anonymous 

Sorry, I’m not sure what the screenshot you shared meant to express?

I suspect that  you need to seperate the column "counter" to create a separate table as a filter.

If possible, it is recommended to share a simple demo with me to test.

 

Best Regards,
Community Support Team _ Eason

Anonymous
Not applicable

@v-easonf-msft 

 

Hey,

 

thank you for your reply. I have created the following data:

 

Download Pbix 

 

What I want is to choose the "counter" and "month" and the visual gives me the correct rank for that.

Hi, @Anonymous 

Does @amitchandak 's solution  not apply to your actual problem?

I try to use function "All " rather than "Allselected"  in your sample file, it works well :

 

Rank = RANKX ( ALL( Test[Counter] ), CALCULATE ( [SO/Day] ) ) 

 

34.png

If I miss something, please let me know.

 

Best Regards,
Community Support Team _ Eason

amitchandak
Super User
Super User

@Anonymous , not very clear. But if you want filter an item and show it rank. Then you have to use all in the rank formula

Rank = 
RANKX ( ALL( Jahr_Plan[Counter] ), CALCULATE ( [SO/Tag 2020] ) ) 

 

In this case rank will not change with filter

 

For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415

Anonymous
Not applicable

I want it to change with filter, but give me the rank in the row

Thank you SO much!

Here an example:

 

Rank_Select.png

Can you please share the pbix file?
Anonymous
Not applicable

Hello @amitchandak 

 

I want it just to change with my "customer"filter. So when I change my customer/counter it should give me the rank for that month and counter - at the moment it gives me the total rank of all.

I think you need to create virtual table at the correct granularity of Customer and Months use SUMMARIZE to bring together these 2 fields

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.