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
Anonomous
New Member

Sum the averages of multiple categories

Hello! I'm struggling to come up with a DAX formula (measure or calculated column) that will calculate the Sum of the average score for each evaluation area.

 

In my scenario, there are 3 people giving scores to 2 different companies based on 3 different evaluation areas (e.g., John scores Company X and Company Y based on criteria 1, 2 and 3). I want to calculate the average score of each evaluation area by company, and then sum those averages (so the sum of averages for each company). I'm hoping to make the formula dynamic so that if certain scorers or eval areas are filtered out, the end result would change accordingly. Thank you very much!

 

The end result will look like the last column in the table below. The calculations should look like this:

 

Company X: 

Avg score of eval area 1 = 2.83

Avg score of Eval area 2 = 2.50

Avg score of Eval area 3 = 3.50

Sum of all eval areas = 8.83

 

Company Y:

Avg score of eval area 1 = 3.33

Avg score of Eval area 2 = 2.67

Avg score of Eval area 3 = 3.0

Sum of all eval areas = 9.0

 

Evaluation Area

Scorer

ScoreCompanyCalculated column/measure desired result
Eval area 1Andy3Company X8.83
Eval area 1John4Company X 8.83
Eval area 1Beth1Company X 8.83
Eval area 2Andy2Company X 8.83
Eval area 2John3Company X 8.83
Eval area 2Beth1Company X 8.83
Eval area 3Andy5Company X 8.83
Eval area 3John1Company X 8.83
Eval area 3Beth2Company X 8.83 
Eval area 1Andy5Company Y9.0
Eval area 1John1Company Y9.0
Eval area 1Beth3Company Y9.0
Eval area 2Andy2Company Y9.0
Eval area 2John4Company Y9.0
Eval area 2Beth5Company Y9.0
Eval area 3Andy3Company Y9.0
Eval area 3John2Company Y9.0
Eval area 3Beth1Company Y9.0
1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file if it suits your requirement.

 

Jihwan_Kim_1-1702105139310.png

 

 

Jihwan_Kim_0-1702105116939.png

 

 

Expected result measure: =
IF (
    HASONEVALUE ( 'Evaluation Area'[Evaluation Area] ),
    AVERAGE ( Data[Score] ),
    SUMX (
        VALUES ( 'Evaluation Area'[Evaluation Area] ),
        CALCULATE ( AVERAGE ( Data[Score] ) )
    )
)

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
Anonomous
New Member

This is exactly what I was looking for, thank you very much!

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file if it suits your requirement.

 

Jihwan_Kim_1-1702105139310.png

 

 

Jihwan_Kim_0-1702105116939.png

 

 

Expected result measure: =
IF (
    HASONEVALUE ( 'Evaluation Area'[Evaluation Area] ),
    AVERAGE ( Data[Score] ),
    SUMX (
        VALUES ( 'Evaluation Area'[Evaluation Area] ),
        CALCULATE ( AVERAGE ( Data[Score] ) )
    )
)

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.