Forum Discussion

SpartakO1's avatar
SpartakO1
Helper I
5 years ago
Solved

Dynamic variation

Hello everyone,   I trying to simplify the calculations for the following data: need to calculate the variation between the different simulation, just to prevent creating measures each time we cre...
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi  SpartakO1  ,

    Here are the steps you can follow:

    You can use the selectvalue function to calculate the field data corresponding to the two data when you select two data in the variant of simulation

     

    For example:

    Select Rev1 and rev2, and compare the price per unit corresponding to Rev1 with the price per unit corresponding to rev2

    1. Create measure

    compara =
    var _min=MIN('Table (2)'[Variant of simulation])
    var _max=MAX('Table (2)'[Variant of simulation])
    return
    CALCULATE(SUM('Table (2)'[Price per unit]),FILTER(ALL('Table (2)'),'Table (2)'[Variant of simulation]=_max))
    -
    CALCULATE(SUM('Table (2)'[Price per unit]),FILTER(ALL('Table (2)'),'Table (2)'[Variant of simulation]=_min))

    2. Result

     

    You can downloaded PBIX file from here.

     

    Best Regards,

    Liu Yang

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