Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Subtract values according to condition

Hi all ! How are you?

 

I have the following problem:

I need to create a Measure that can subtract the value of a Measure and the value of the Benchmark table.

For example

Store Total = is measure.

Store Benchmark = is a value from a table.

Total Benchmark = Store 6 Benchmark (28%) - Store 6 Total (12%) = 16%

 

 

I'm blocked with something that seems pretty simple.
Would it help me understand the problem of why I can't subtract it?

 

Thanks!

Regards!

  • Measure =CALCULATE(sum(Column1) - Sum(column2), storeId=6)

    Please give Kudos to this effort and mark it as a solution if it helps you.

5 Replies

  • Have you made proper relationship between those two table?
    • Anonymous's avatar
      Anonymous
      Not applicable

      hi Tahreem24 , Yes, both tables are related through the Id_Store.

      • Tahreem24's avatar
        Tahreem24
        Icon for Super User rankSuper User
        Measure =CALCULATE(sum(Column1) - Sum(column2), storeId=6)

        Please give Kudos to this effort and mark it as a solution if it helps you.