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.
hi,
i want to calculate an average salary per week per employee.
Name | Week | Salary |
A | 1 | 60 |
B | 1 | 70 |
C | 1 | 50 |
D | 1 | 70 |
A | 1 | 80 |
B | 1 | 70 |
C | 1 | 80 |
A | 1 | 20 |
B | 1 | 60 |
C | 1 | 70 |
D | 1 | 50 |
A | 1 | 70 |
B | 1 | 80 |
C | 1 | 70 |
kind regards
Solved! Go to Solution.
Hi Framboosje,
To achieve this, you can create a calculate column using DAX formula below:
Result = CALCULATE(AVERAGE(Table1[Salary]), ALLEXCEPT(Table1, Table1[Name], Table1[Week]))
Regards,
Jimmy Tao
You can summarize that info in a new table:
AverageperEmployee =
SUMMARIZE (
'Table',
'Table'[Name],
'Table'[Week],
"Average Salary", AVERAGE ( 'Table'[Salary] )
)
Thanks but can this be done in a calculation instead of a new table?
It looks to me you only need a simple measure:
Average Salary = AVERAGE([Salary])
In your table chart, you add Week, Employee and Average Salary. You will see your average per week per employee.
Let me know if I missed something
this is not gonna work for me because i need averages of 3 different things per week in one chart
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
81 | |
66 | |
58 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |