Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to change values based on the slicer selection using DAX

Product Date QuantityDemand A 1/05/2019 58 A 18/03/2019 24 B 2/04/2020 52 C 7/05/2021 63 C 2/05/2021 100 A 3/10/2020 63   I have a data set that looks like the...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    You can use what-if parameter.

     

    Then create the following separate table.

    Table 2 = DISTINCT('Table'[Product])

     

    At last, create the following measure.

    Total Quantity Demand = CALCULATE(SUM('Table'[QuantityDemand]),FILTER(ALL('Table'),[Product]<>SELECTEDVALUE('Table 2'[Product])))+SELECTEDVALUE('Quantity demand'[Dynamic Quantity demand])

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.