Forum Discussion

ApurvaKhatri's avatar
ApurvaKhatri
Helper III
8 years ago
Solved

Get sum based on multiple column group/filter

Hi I have following data   Invoice1 Invoice2 Invoice 3 Invoice 4 Invoice 5 Invoice 6 Repaircost 1 0 0 0 0 0 -5867.69 2 15 15 24     -4329.87 6 999 999       -406...
  • v-caliao-msft's avatar
    v-caliao-msft
    8 years ago

    ApurvaKhatri,

     

    You need to rename those column in tables to ensure that all the columns name are the same on each table, and then append those queries in Query Editor.


    Then create a new table by using the DAX.

    Table = SUMMARIZE(Table1,Table1[Type],"TotalCost",CALCULATE(SUM(Table1[Cost]),ALLEXCEPT(Table1,Table1[Type])))

     

    Regards,

    Charlie Liao