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.
Hello everyone
As you all know, the salary is a set of codes for each month and person, right? Like the salary, food allowance, productivity allowance, etc.
I would like to know the average of the salary only for each person, each month, of a particular year. And this measeure would work if every month had values, which it does not.
Solved! Go to Solution.
Hi @pedroccamaraDBI ,
var _a = 'table'[avg]
This is the measure you created before.
I have created a simple sample , please refer to it to see if it helps you.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@pedroccamaraDBI , Try like
Avg salary By Year & Employee =
var _calc = AVERAGEX(
VALUES( 'Employee'[WorkerName] ),
[Salary])
return
AVERAGEX(filter(
VALUES( 'Dates'[MonthOfYear]) , _calc <> 0 ),_calc)
Hello @amitchandak
Thank you for your answer.
I think you've manage to filter the non salary values,
But instead of the average it's showing the total.
I thought it would be enough to replace the VALUES function but not.
Can you still help me?
Hi @pedroccamaraDBI ,
Please have a try.
Create a measure.
measure== var _a = 'table'[avg]
var _b = SUMMARIZE('table','table'[date],"aaa",'table'[avg])
return
IF(HASONEVALUE('table'[date]),_a,averagex(_b,[aaa]))
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @v-rongtiep-msft !!
I'm sorry but I don't understand this. Could you explain?
var _a = 'table'[avg]
Hi @pedroccamaraDBI ,
var _a = 'table'[avg]
This is the measure you created before.
I have created a simple sample , please refer to it to see if it helps you.
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 |
---|---|
47 | |
22 | |
20 | |
15 | |
13 |
User | Count |
---|---|
49 | |
41 | |
39 | |
19 | |
19 |