Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Create a summary table

Hello,   I have two tables with différent type of code, each table has a code, an amount column and a date table.  I want to create a third table wich is a summary of the previous one.   With 5 ...
  • tex628's avatar
    6 years ago

    Add this code to a calulated table:

    Table = 
    NATURALINNERJOIN(
    SUMMARIZE(ADDCOLUMNS('Table 1' , "Month_" , MONTH('Table 1'[Month])) , [Month_] , "Countrows T1" , COUNTROWS('Table 1') , "SUM CA T1" , SUM('Table 1'[CA]))
    ,
    SUMMARIZE(ADDCOLUMNS('Table 2' , "Month_" , MONTH('Table 2'[Month])) , [Month_] , "Countrows T2" , COUNTROWS('Table 1') , "SUM CA T2" , SUM('Table 1'[CA]))
    )

     



    Br,

    J