Forum Discussion

ngct1112's avatar
ngct1112
Icon for Post Patron rankPost Patron
6 years ago
Solved

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
IDPriceStatus
15.00Progress
25.00Progress
38.00Done
48.00Done
510.00Done
610.00Done
712.00Progress
812.00Progress
915.00Progress
1015.00Progress
Table B
IDPriceStatus
15.00Progress
510.00Progress
712.00Progress
812.00Progress
Table C
IDPriceStatus
38.00Progress
610.00Progress
  • ngct1112's avatar
    ngct1112
    6 years ago

    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])
  • ngct1112 

    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

  • 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's avatar
      ngct1112
      Icon for Post Patron rankPost Patron

      amitchandak it seems there is something missing. Would be appreciared if I could know where goes wrong.

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        Please find the attached file after signature

        Measure = 
        var _d = EXCEPT(EXCEPT(FILTER(TableA,TableA[Status]="Progress"),TableB),TableC)
        return
        sumx(_d,[Price])