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

Average of a group in a line chart

Hello,

 

I'm trying to display 3 things  on a line chart:

 

- average asked score  ( a constant )     - Done

- average score of someone  - Done

- average score of the someone 's team   - issue

 

Here are my data

 

Hologanpa_0-1603900779552.png

 

there are several Departments , with several teams , with several technicians.

 

 

 

I'd like to display my result in a line chart like this. A filter allow me to choose a Department , then a team , then a technician

 

 

Hologanpa_1-1603900917861.png

 

 

I tried the following Dax formula : 

 

Avg_Score_department = CALCULATE(AVERAGE(Data[Score]),ALL(Data[Technicien])) 
 
thinking it would keep all technician from selected team ... it works fine until I choose a technician ( despite ALL statement ) , then I can't explain the result ...
 
I also tried " ALLEXEPT" statement but it return a constant ..
 
Team is in " SILAE" table , I also tried  to add a team column in "DATA" table but it returns the same result ..
 
Anybody has a lead ?  

 

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try with Team/Technicien

Avg_Score_department = CALCULATE(AVERAGE(Data[Score]),filter(ALLselected(Data), Data[Technicien] =max(Data[Technicien])))

Anonymous
Not applicable

@amitchandak  Hello and thanks for your fast anwser 😊

 

unfortunately , it's not working since it shows a constant ( same result with Team/ Technician ) ...

 

I 'd like it to be calculated per month , may be I should use AVERAGEX  ?

 

Hologanpa_1-1603961428421.png

 

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.

Top Solution Authors