Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 216047

Rank a column in a table based on slicer selection

$
0
0

 

Here is a sample picture of the report I'm building.

 

 

 Screenshot_3.png

What I want to do is show the top [selected number] (5/10/50/100) operators ranked by the selected metric, For example if I select Metric1 and top 10 i want the top 10 operators ranked by Metric1. I managed to do the Top N thing and here are the measures I used:

 

Rank = RANKX(ALL(Table[Operator], Metric1, , DESC, Dense)

SelectedNumber = MIN(TopN[Top])

Show = IF([Rank]<=[SelectedNumber], "<=")

 

But this is fixed for Metric1 only (I wanted to see if it will work). What I want to do now is change the measure Rank to be dynamic, like this:

 

Rank = RANKX(ALL(Table[Operator], SelectedMetric, , DESC, Dense) where SelectedMetric=FIRSTNOBLANK(Filters[Name],1).

I have all the metrics names in a different table (Filters). All the metrics and the operator column are in the same source - Table. 

 

Can anyone please help me? Any ideas would be welcomed.

Thanks Smiley Happy 

 


Viewing all articles
Browse latest Browse all 216047

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>