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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anno2019
Helper IV
Helper IV

Weight Average using subtotal

Dear Communitiy

 

I am trying to calculate a weighted average using a Sales Persons results only.

In the image below I explain what I am trying to achieve.

The columns in greens should be = [Apples Sales]/[Subtotal Peter Parker], I am not sure how to do this in DAX.

Weighted Average using Subtotal.JPG

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

HI @Anno2019 

I will assume that Apple Sales is a measure
Then for the total per sales person = CALCULATE ( [Apple Sales], ALLEXCEPT ( Sales, Sales[Sales Person] ) ) 

ofcourse you need first to decide if the sales person sells to different countries what should be the logic? Would you consider each country seperately or as a whole?

View solution in original post

2 REPLIES 2
tamerj1
Super User
Super User

HI @Anno2019 

I will assume that Apple Sales is a measure
Then for the total per sales person = CALCULATE ( [Apple Sales], ALLEXCEPT ( Sales, Sales[Sales Person] ) ) 

ofcourse you need first to decide if the sales person sells to different countries what should be the logic? Would you consider each country seperately or as a whole?

@tamerj1 

You rule!  It works!  I will take other countries into consideration later.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.