Forum Discussion

david2's avatar
david2
Helper I
9 years ago
Solved

Summarizing two different tables

Hi there,   I have two tables in my data model that contain marketing costs for our organisation. I would like to combine them into one table and summarize the cost per day. As both tables are diff...
  • BhaveshPatel's avatar
    9 years ago

    You can use Append to achieve this. Select Append as new Queries, Append Table B on the Table A and then You can do GROUPBY,

     

    Group by Date, Operation Sum and Column is Euro. This will give you the desired result. See the attached screenshot.

     

    Append as new queriesGroupbyFinal outcome

  • v-yulgu-msft's avatar
    9 years ago

    Hi david2

     

    That combining two tables can be easily achieved using DAX, please refer to below formulas to create new tables:

    Table1 = UNION(TableA,TableB)
    TableC = SUMMARIZE(Table1,Table1[Date],"Costs",SUM(Table1[Costs]))

    If you have any other question, please feel free to ask.

     

    Best regards,
    Yuliana Gu