Forum Discussion
mohammedismail
Helper I
8 years agoSlider to Select data by Top & Bottom Percentage
Hi,
I'm looking for a report with a slider which will help me select top N% or Bottom N% of Products by Sales amount.
Please can someone help?
Thanks
3 Replies
- Stachu
Community Champion
Could you paste your sample data here? how does the underlying data look like?
- v-chuncz-msft
Community Support
You may try using RANKX Function to add a measure and take advantage of Visual level filters.
- rajulshah
Resident Rockstar
Hello mohammedismail,
You can use 'What-If' Parameter and then use the following measure:
TopN Categories = var N = SELECTEDVALUE('TopN'[TopN]) RETURN SWITCH(TRUE(),
N = 0, [*Your measure calculating percentage*],
RANKX (
ALLSELECTED( [*your category*]),
[*Your measure calculating percentage*],,DESC,Dense
)
<= N,
[*Your measure calculating percentage*])where TopN is the table when created What-If parameter.