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
Anonymous
Not applicable

Sales by Agent, team and supervisor

so I can't seem to get this to work 

https://ufile.io/k8h1y6r0

 

I'm trying to show all my agents sales, then show the avg sales per Supervior (region) and Team in individual columns. 

 

Avg Sales by Supervisor = CALCULATE(

AVERAGE(Data[sales])

, ALLEXCEPT(Data,Data[Supervisor])

)

works if the Supervior is visable on the matrix, but it I don't want to display supervior how can I get this to work?

when I remove the supervisor from the visual then it seems to revert to an avg of the total which I don't want. 

 

for Agent Bill for example I would ideally see

 

Agent - Sales - Avg by Supervior - Avg by Team

Bill - 70 - 93 - 246

 
same with Avg Sales by Team. 
3 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Try like

 

averageX(values(Data[Supervisor]), calculate(AVERAGE(Data[sales]), ALLEXCEPT(Data,Data[Supervisor])))

 

or


averageX(summarize(Data, Data[Supervisor], "_1", AVERAGE(Data[sales])), [_1])

 

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

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

You are welcome.  If my reply helped, please mark it as Answer.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

looks like this method also works! thanks

You are welcome.  If my reply helped, please mark it as Answer.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Anonymous , Try like

 

averageX(values(Data[Supervisor]), calculate(AVERAGE(Data[sales]), ALLEXCEPT(Data,Data[Supervisor])))

 

or


averageX(summarize(Data, Data[Supervisor], "_1", AVERAGE(Data[sales])), [_1])

 

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

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