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
sparkplug93751
Helper II
Helper II

Getting Category total per Item

Hello,

 

I have a measure that I want to use to measure where (actual item/category total)*forecast total = item forecast

 

How can I isolated the category total for it to be the same per item in the category? I'm currently using a sumx but that isn't adding the values, only aggregating it at a higher level where 

 

Category total = 

CALCULATE(SUMX(Category,[Forecast Cost]),
(GROUPBY(Category,Category[Category])),
USERELATIONSHIP('Forecast'[Category & Description],'Category'[Category & Description]))
 
It's not summing the values rather performing the forecast cost which is 
Forecast Cost = (Planned items * cost per item)+cost so far
 
Any help is appreciated
3 REPLIES 3
Anonymous
Not applicable

Hi @sparkplug93751 ,

 

Sounds like you can use ALLEXCEPT() function.

Something like 

calculate(sum(value),allexcept(table,category))

 Better to share some sample data to us so that we can offer more detailed help.

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The hours column is a calculated measure in my matrix and appears without issue. THe measure I need to show now is the total per category next to each task. ie category A is 60.

 

Since the hours column is a measure using a ratio (mentioned in first post), power bi isn't summing the category, rather applying the function to it - even when using sumx

 

Thanks

 

https://tuprd-my.sharepoint.com/:x:/g/personal/tug67925_temple_edu/Ea-YR9LgqXtKhvpCz5fAJqABxrYlIiGLX... 

Greg_Deckler
Community Champion
Community Champion

Tough to follow, sample data and expected output would help. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

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
Top Kudoed Authors