Forum Discussion

Power_MN's avatar
Power_MN
Icon for Helper I rankHelper I
5 years ago
Solved

Change Value with Slicer // dynamic Value

Hello everyone, I am facing a big problem and I hope that someone here can help me with their expertise. I have created a report that compares a certain price, which is entered by the responsible depa...
  • v-yingjl's avatar
    5 years ago

    Hi Power_MN ,

    Use what-if parameters and try to create measures like this:

    Initial rank = 
    RANKX(
        ALL('Table'),
        CALCULATE(SUM('Table'[Price])),,DESC,Dense
    )
    
    
    New Rank = 
    IF(
        SUM('Table'[Price]) > 'Price reference'[Price reference Value], [Initial rank],
        RANKX(
            FILTER(
                ALL('Table'),
                'Table'[Price] <= 'Price reference'[Price reference Value]
            ),CALCULATE(SUM('Table'[Price])),,DESC,Dense
        )
    )

     

    Attached a sample file in the below, hopes it could help.

     

    Best Regards,
    Community Support Team _ Yingjie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.