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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
coffjoh2004
Regular Visitor

SumX measure not summing each level

I am building a matrix where the value is a measure that multiplies an average unit price with a quantity. There are 3 row levels that i can drill down to. System -> work order -> item

 

Value measure: 

cost = if(HASONEFILTER(Query1[ITEM#]),[aup*qty],sumx(query1,[aup*qty]))
 
The aup* qty is a background measure that does exactly what the title implies

Item# is the bottom level of the matrix, so it works for each item but when i roll it up to the work order level, it doesn't calculate correctly
coffjoh2004_0-1692108628270.png

 

how could i rewrite the measure so the work order level is the sum of all the items, and the top level (system) is the sum of all the work orders?

 

thanks!

1 REPLY 1
amitchandak
Super User
Super User

@coffjoh2004 , aup and qty are from same table, you should simply create a measure like

 

Sumx(Table, [aup] * [qty])

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors