Forum Discussion

Foguete's avatar
Foguete
Helper I
3 years ago
Solved

Addcolumn, different cases, summarize

Hello,   I need help as I am trying to build a table with a case I never face untill now. I currently have a table with different line that I want to summarize. For example:   date task ce...
  • FreemanZ's avatar
    3 years ago

    hi Foguete 

    try to create a calculated table like:

    Table = 
    VAR _table= 
    ADDCOLUMNS(
        SUMMARIZE(
            TableName,
            TableName[Date],
            TableName[task]
        ),
        "center", "c",
        "Qty", CALCULATE(SUM(TableName[Qty]))
    )
    RETURN
    UNION(TableName, _table)

     

    verified and worked like this: