Reputation: 281
I am trying to create a simple measure that sums the total of a column if multiple conditions are true. This is the table:
I want to sum the value in the 'value' column if it is type 'A' or type 'B'.
How would I go about doing this?
Upvotes: 0
Views: 34
Reputation: 5542
You create a measure like this:
total= CALCULATE(SUM(table[Value]), table[Type] IN {"A","B"})
If you want it to react to a filter on type you can change it to:
total= CALCULATE(SUM(table[Value]), KEEPFILTERS(table[Type] IN {"A","B"}))
Upvotes: 2