Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Slicer for dynamic Indes

Hello,   I created a measure for a dynamic Index for a ranking:   I would like to have slicer for this, to select the top N with it.    Can someone help me? I cant put this measure in a s...
  • mahoneypat's avatar
    mahoneypat
    6 years ago

    Here are more details

     

    1. Make a What If Parameter (you've already done that for your Rank slicer

    2.  Make a measure like this one (using your tables, columns, measures

     

    RankSales = var rankvalue = RANKX(all(Sales[Product]), CALCULATE(sum(Sales[Sales])))
    var rankthreshold = SELECTEDVALUE(RankSelect[RankSelect]) //this is your slicer table and column
    return if(rankvalue<=rankthreshold, rankvalue, BLANK())
     
    3.  Use this measure in the visuals you want to filter.  Highlight each visual you want to filter with the slicer.  For each, in the Filters pane on the right, drag your new measure into the "Filters On This Visual" area and choose "is not blank".
     

    If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat