Forum Discussion

mohammedismail's avatar
8 years ago

Slider 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's avatar
    Stachu
    Icon for Community Champion rankCommunity Champion

    Could you paste your sample data here? how does the underlying data look like?

  • rajulshah's avatar
    rajulshah
    Icon for Resident Rockstar rankResident 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.