Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Group and Sum Row by Row

Hello, Please see below, I want to group “KEY” column once I group same key ,In a new column I want to display total quantity and total sales price. I have used Group by and I am getting below err...
  • Anonymous's avatar
    Anonymous
    7 years ago

    give this a try:

    Table = 
    ADDCOLUMNS(
        SUMMARIZECOLUMNS(Table1[Key]),
        "Total Qty", CALCULATE( SUM( Table1[Quantity])),
        "Total Sales Price", CALCULATE( SUM( Table1[Sales Price]))
    )