Forum Discussion

ddalton's avatar
ddalton
Resolver I
4 years ago
Solved

Create new table that sums rows based on matching column value

I have a table containing data with columns containing a reference (non-unique) and a type (non-unique). A representation is below:   TableA Reference Type Value A123 Type1 5521 A123 ...
  • SpartaBI's avatar
    4 years ago

    ddalton create this calculated table:

     

     

    TableB = 
    ADDCOLUMNS(
        VALUES('TableA'[Reference]),
        "Type1", CALCULATE(SUM('TableA'[Value]),'TableA'[Type] = "Type1"),
        "Type2", CALCULATE(SUM('TableA'[Value]),'TableA'[Type] = "Type2")
    )

     

     

     

     





          

    Showcase Report – Contoso By SpartaBI