Forum Discussion
Giada90
4 years agoHelper IV
problem with a calculation
Hi, I have a table with two fields like this: type value A 10 B 3 I need to make a measure that subtracts value A from value B Which dax formula can I use? Thanks
- 4 years ago
thanks!
Giada90
4 years agoHelper IV
Pragati11, I need to have the sum of all the values that match with A and substract all the values that match with B, I attached more simple data, thanks
| type | value |
| A | 10 |
| B | 3 |
| A | 5 |
| B | 4 |
| A | 7 |
| B | 3 |
| A | 9 |
| B | 2 |
Tsrivastava
4 years agoFrequent Visitor
DAX=
Var TypeA = calculate(sum(value),filter(tablename, type = A)
Var TypeB = calculate(sum(value),filter(tablename, type = B)
RETURN TypeA-TypeB