Forum Discussion

J89's avatar
J89
Frequent Visitor
3 years ago
Solved

Using values from sliced measures in other measures

Hi all,   I'm new to Power BI. Hoping someone might be able to help me with the below problem. I've tried to search for the answers but nothing I find seems to work. Maybe I'm not searching for the...
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi J89 ,

     

    There are many other factors that you haven't clarified clearly, such as whether your slicer fields are all from the same table? What are your specific formulas for measure 1 and measure 2? If you can, please provide some sample data (some tabular type data), as well as the desired results.

    I made a sample and don't know if it matches your situation.

    Sample data

    Slicer1 and Slicer2 are calculated tabls.

    There're no relationships among three tables.

    Measure1 = CALCULATE(SUM('Table'[percentage]),FILTER(ALLSELECTED('Table'),[year]=SELECTEDVALUE(Slicer1[year])&&[action]="Y"))
    Measure2 = CALCULATE(SUM('Table'[percentage]),FILTER(ALLSELECTED('Table'),[year]=SELECTEDVALUE(Slicer2[year])&&[action]="Y"))
    Measure3 = [Measure1]-[Measure2]

     

     

    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.