Forum Discussion

Anno2019's avatar
Anno2019
Helper IV
4 years ago
Solved

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.

  • 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?

2 Replies

  • tamerj1's avatar
    tamerj1
    Community Champion

    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?

    • Anno2019's avatar
      Anno2019
      Helper IV

      tamerj1 

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