Forum Discussion
Calculate SUM with multiple criteria
Hi All,
I have a complicated situation here. I got 3 tables. Is there any Measure I could find out the sum price by
1.) Filter Status as "Progress" in Table A (Result - ID: 1, 2, 7, 8, 9, 10)
2.) Sort out that appeared already in Table B & C (Result - ID: 2, 9 , 10)
3.) SUM the Pirce of ID: 2, 9, 10 (Result - Price: 35)
| Table A - Master | ||
| ID | Price | Status |
| 1 | 5.00 | Progress |
| 2 | 5.00 | Progress |
| 3 | 8.00 | Done |
| 4 | 8.00 | Done |
| 5 | 10.00 | Done |
| 6 | 10.00 | Done |
| 7 | 12.00 | Progress |
| 8 | 12.00 | Progress |
| 9 | 15.00 | Progress |
| 10 | 15.00 | Progress |
| Table B | ||
| ID | Price | Status |
| 1 | 5.00 | Progress |
| 5 | 10.00 | Progress |
| 7 | 12.00 | Progress |
| 8 | 12.00 | Progress |
| Table C | ||
| ID | Price | Status |
| 3 | 8.00 | Progress |
| 6 | 10.00 | Progress |
amitchandak it seems there is something missing. Would be appreciared if I could know where goes wrong.
Please find the attached file after signature
Measure = var _d = EXCEPT(EXCEPT(FILTER(TableA,TableA[Status]="Progress"),TableB),TableC) return sumx(_d,[Price])If there is a keyword or space, table name needs to be there in a single quote. Better you let power BI suggest you the name and you take it. Type few letter power Bi will suggest
6 Replies
- amitchandak
Super User
ngct1112 , I did not test it. But try like
measure = var _d = except(except(filter(TableA,TableA[Status]="Status"),TableB),TableC) return sumx(_d,[Price])- ngct1112
Post Patron
amitchandak it seems there is something missing. Would be appreciared if I could know where goes wrong.
- amitchandak
Super User
Please find the attached file after signature
Measure = var _d = EXCEPT(EXCEPT(FILTER(TableA,TableA[Status]="Progress"),TableB),TableC) return sumx(_d,[Price])