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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
kjmts5200
Frequent Visitor

How to create measure to sum averages by client

Hello,

 

I am trying to create a measure that sums the averages by client over whatever period of time I chose.  I have a data table with 150k clients and 200k accounts for each month over a 36 month period.  So for example below if i wanted to see the total client revenue by John Doe I would need the measure to prevode an answer of 22+40= $62.  Before anyone asks I cannot add up the revenue by account instead of by client for various reasons I wont bore you with.  I tried SumX(Values(Client),Calculate(Average(Client revenue)) per recommendations from other posts but its not providng the correct answer.  Any help would be appreciated!

 

Month                    Account  Client           Account Revenue    Client Revenue

January-22123John Doe$10.00$22.00
January-22124John Doe$12.00$22.00
January-22125Jane Doe$17.00$30.00
January-22126Jane Doe$13.00$30.00
February-22123John Doe$15.00$40.00
February-22124John Doe$25.00$40.00
February-22125Jane Doe$11.00$23.00
February-22126Jane Doe$12.00$23.00
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You need to replace the VALUES with SUMMARIZE, because you need to take the month into account too

SUMX(
	SUMMARIZE( 'Table', 'Table'[Client], 'Table'[Month] ),
	CALCULATE( AVERAGE( 'Table'[Client Revenue] ) )
)

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

You need to replace the VALUES with SUMMARIZE, because you need to take the month into account too

SUMX(
	SUMMARIZE( 'Table', 'Table'[Client], 'Table'[Month] ),
	CALCULATE( AVERAGE( 'Table'[Client Revenue] ) )
)

That worked.. Thank you!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.