Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Groupby/Summarize and sum calculated Column

I have a table similar to this, I have a bar chart which contains only Name and Total Cost.

If i filter value Greater than 3500 then the bar chart should show Customer 1 = 7000 but it picksup single row and providing result as Customer 1 = 3600. (Basically it should sums up Total Cost based on Name)

Since Total Cost is a calculated Column, it was not visible when i try Groupby option.

Any Help Please.

Note: Total Cost Column is a calculated Column based on other fields

NameItemPer UnitNo. UnitTotal Cost
Customer 1TV17002Sum(1700*2 = 3400)
Customer 1Fridge18002Sum(1800*2 = 3600)
Customer 2TV15002Sum(1500*2 = 3000)
  • Hi,

     

    Please try to create this calculated table:

    Table 2 = SUMMARIZE('Table','Table'[Name],"Total Cost",SUMX(DISTINCT('Table'),'Table'[No. Unit]*'Table'[Per Unit]))

    The result shows:

     

    Hope this helps.

     

    Best Regards,

    Giotto Zhi

4 Replies

  • v-gizhi-msft's avatar
    v-gizhi-msft
    Icon for Community Support rankCommunity Support

    Hi,

     

    Please try to create this calculated table:

    Table 2 = SUMMARIZE('Table','Table'[Name],"Total Cost",SUMX(DISTINCT('Table'),'Table'[No. Unit]*'Table'[Per Unit]))

    The result shows:

     

    Hope this helps.

     

    Best Regards,

    Giotto Zhi

  • You can create a column

    new column = [Per Unit]*[No. Unit]

     

    New mseaure = sumx(table,table[Per Unit]*table[No. Unit])

     

    Appreciate your Kudos.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg_Deckler amitchandak 

       

      My need is to GroupBy "Name" and SumUp "Total Cost" which is a Calculated Column.

      End result should be as below,

       

      NameTotal Cost
      Customer 17000
      Customer 23000