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

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

Reply
Analitika
Post Prodigy
Post Prodigy

Subtotal averaged instead of sum

I use this measure

 

SuperAveage =
VAR multiplier =
IF (
SELECTEDVALUE('units'[MAT_12]) <> BLANK ();
SELECTEDVALUE('units'[MAT_12]);
1
)
VAR sResult =
DIVIDE(
[AllSubNamePrice];
[AllSubNameCount]
) * multiplier

RETURN


sResult
 
Untitled.png
 
But in total i got not Sum but average probably. So how to get Sum in subtotal?
 
 
3 REPLIES 3
Anonymous
Not applicable

HI @Analitika,

I'd like to suggest you take a look at the following blog about measure calculation on the total level and add if statement to check the current row contents level. Then you can write a specific formula with aggregate function to achieve different aggregate on the total level:

Measure Totals, The Final Word  
Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Analitika , You need to group data until a level and then take a sum. Use summarize or values

example

sumx(summarize(table,table[group],"_1",[SuperAveage]),[_1])

 

sumx(values(table[group]),[SuperAveage])

 

Or

https://community.powerbi.com/t5/Desktop/SUM-of-AVERAGE/td-p/197013

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
vanessafvg
Super User
Super User

can you give more information about what you are trying to do, its not entirely clear. sharing some data is also useful




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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