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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
sonam7
Microsoft Employee
Microsoft Employee

Sum of values

Hello everyone

I have the following table in Excel, I'm trying to do the same in PowerBI, but the result is not as expected.

I've created a measure for UnitsbyType

UnitsbyType á IF(MAX('MASCI vwEnvironments'[Type]) á "HC4",[Total Envs]*4,IF(MAX('MASCI vwEnvironments'[Type]) á "HC8", [Total Envs]*8,IF(MAX('MASCI vwEnvironments'[Type])'"HC12",[Total Envs]*12,IF(MAX('MASCI vwEnvironments'[Type]) á "HC16",[Total Envs]*16,[Total Envs]*1))))
TotalUnits.PNGAllocation Total.PNGAllocation%.PNG
Next I want to calculate total units as in Excel by adding UnitsByType for each branch, i.e. Prod, ASDB, ProdNext, etc. This is what I'm trying to do, but it doesn't give me the right value.
Total Units - SUMX(Summarize('MASCI vwEnvironments','MASCI vwEnvironments'[Branch]),[UnitbyType])
Can someone please help me with how I get these values in Excel?
Thank you
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@sonam7 , Assume you measure is M1 and Group by is Type

 

Try new measure like

sumx(summarize(Table,Table[Type],"_1", [M1]),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

@sonam7 ,

 

There's syntax error in the measure you post and the snapshots are not clear to see. Could you please give the expected result?

 

Regards,

Jimmy Tao

amitchandak
Super User
Super User

@sonam7 , Assume you measure is M1 and Group by is Type

 

Try new measure like

sumx(summarize(Table,Table[Type],"_1", [M1]),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors