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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
GideonM
New Member

Aggregating budget values at the correct level

My data is a big flat file in Excel containing Sales figures.

 

CategorySubcategoryProductSalesBudget
BeveragesBeersStella Artois£20,081£62,800
BeveragesBeersJohn Smiths£20,001£62,800
BeveragesBeersGuinness£22,542£62,800
BeveragesColaCocacola£11,583£23,300
BeveragesColaPepsi£11,853£23,300
BeveragesWinesHardys Stamp Shiraz£10,959£36,500
BeveragesWinesNicolas Feillatte Champagne£11,838£36,500
BeveragesWinesTio Pepe£13,163£36,500
FruitBananasFairtrade bananas£66,331£73,700
FruitOrangesOranges£21,464£66,300
FruitOrangesSatsumas£22,136£66,300
FruitOrangesOrtaniques£22,611£66,300
FruitPearsWilliams£75,878£69,300
FruitStrawberriesAlba£24,087£26,200

 

The Budget figures are aggregated at the level of Subcategory and are repeated in the transactions table for each instance of the Subcategory. I would like to make a table aggregated at the level of Category, like this.

 

CategorySalesBudget
Beverages£122,020£122,600
Fruit£232,508£235,500

 

The Sales are easy but I can't work out how to calculate the Budget figures. I need a Measure that adds up the Budget figures for all Subcategories within the Category, but not weighting by sales. It's something like a Tableau INCLUDE. I've tried to use GROUPBY, but can't get it to work.

 

Please help!

1 ACCEPTED SOLUTION
smpa01
Super User
Super User

@GideonM  use this as a measure

Measure 3 = sumx(SUMMARIZE(t1,t1[Category],t1[Budget]),t1[Budget])

 

smpa01_0-1641826529642.png

 

  

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

View solution in original post

2 REPLIES 2
smpa01
Super User
Super User

@GideonM  use this as a measure

Measure 3 = sumx(SUMMARIZE(t1,t1[Category],t1[Budget]),t1[Budget])

 

smpa01_0-1641826529642.png

 

  

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs

Thanks @smpa01 that looks great!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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