Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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)
1 ACCEPTED SOLUTION
v-gizhi-msft
Community Support
Community 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:

53.PNG 

Hope this helps.

 

Best Regards,

Giotto Zhi

View solution in original post

4 REPLIES 4
v-gizhi-msft
Community Support
Community 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:

53.PNG 

Hope this helps.

 

Best Regards,

Giotto Zhi

Anonymous
Not applicable

@v-gizhi-msft  it works thanks a lot

amitchandak
Super User
Super User

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
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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.