Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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 @Anonymous !!
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
15 | |
11 | |
7 |
User | Count |
---|---|
25 | |
24 | |
12 | |
12 | |
11 |