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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
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.