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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
David_Efr
Regular Visitor

Displaying rank affected by slicer

Hi,

 

I'd like to create a dashboard with a few slicers that filter the visuals.

However, I'd also like to display a text that shows me the rank of the group selected in the slicer among the general population.

 

Example

 

Suppose I have this data: 3 columns from the data source and an additional calculated measure

CompanyShare priceEPSPE Ratio (calculated: [Share price] / [EPS])
Intel52.434.4311.84
IBM139.449.5014.68
Oracle55.412.7919.86

 

I have a single-selection slicer that selects the company.

Suppose I have "Intel" selected in the slicer.

Then, I'd like to have text that says "Rank: 1 out of 3".

If I change selection to "Oracle", I'd like to have the text change to "Rank: 3 out of 3".

 

My question here is how can I neutralize the slicer's effect on the grand total?

I'd like to show the "count(distinct company)" (in SQL terms) calculated on the entire population, and a similar consideration applies on the ranking.

 

I suppose there's a DAX solution, but I'm not too familiar with it yet...

 

Thanks,

David

3 REPLIES 3
v-yuta-msft
Community Support
Community Support

@David_Efr ,

 

You can create a calculate column using DAX below:

Rank =
RANKX ( Table, [PE Ratio],, desc, DENSE )

Community Support Team _ Jimmy Tao

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

v-yuta-msft
Community Support
Community Support

@David_Efr ,

 

Suppose I have this data: 3 columns from the data source and an additional calculated measure

Company Share price EPS PE Ratio (calculated: [Share price] / [EPS])
Intel 52.43 4.43 11.84
IBM 139.44 9.50 14.68
Oracle 55.41 2.79 19.86

 

I have a single-selection slicer that selects the company.

Suppose I have "Intel" selected in the slicer.

Then, I'd like to have text that says "Rank: 1 out of 3".

If I change selection to "Oracle", I'd like to have the text change to "Rank: 3 out of 3".

 

My question here is how can I neutralize the slicer's effect on the grand total?

I'd like to show the "count(distinct company)" (in SQL terms) calculated on the entire population, and a similar consideration applies on the ranking.


In this example, which column do you want to implement the rank measure on? Where is the population field?

 

Community Support Team _ Jimmy Tao

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

I'd like to display the rank of Company by 'PE Ratio' column.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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