Forum Discussion
voiciK
4 years agoFrequent Visitor
SUM - Multiple categories
Hi All, I'm new to Power BI and wondering if you can help me with this sum function. I have a table like this: TEST_TABLE: Type Amount A 10 B 50 C 72 A 65 D 75 W ...
- 4 years ago
Hi,
Try this measure
=CALCULATE(SUM(TEST_TABLE[Amount]),TEST_TABLE[Type]="A")+SUM(TEST_TABLE[Amount]),TEST_TABLE[Type]="B")
or
=calculate(SUM(TEST_TABLE[Amount]),TEST_TABLE[Type]="A"||TEST_TABLE[Type]="B")
Hope this helps.
Ashish_Mathur
4 years agoSuper User
Hi,
Try this measure
=CALCULATE(SUM(TEST_TABLE[Amount]),TEST_TABLE[Type]="A")+SUM(TEST_TABLE[Amount]),TEST_TABLE[Type]="B")
or
=calculate(SUM(TEST_TABLE[Amount]),TEST_TABLE[Type]="A"||TEST_TABLE[Type]="B")
Hope this helps.
voiciK
4 years agoFrequent Visitor
Thank you Ashish, it works! 😄
- Ashish_Mathur4 years agoSuper User
You are welcome.