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 all,
I tried searching in the community but nothing has either helped or was specific to my problem.
I have data in the following format and I need to calculate the adjusted average salary per month. (adjusting for % working time, i.e. salary * % working time).
Person ID | Salary | % Working Time | Effective Date | Month | Adj. Salary |
123 | 1000 | 100 | 1.4.2020 | 4 | ? |
123 | 1000 | 90 | 15.4.2020 | 4 | ? |
123 | 1000 | 80 | 1.5.2020 | 5 | ? |
123 | 1000 | 70 | 1.6.2020 | 6 | ? |
999 | 2000 | 50 | 1.4.2020 | 4 | ? |
999 | 2000 | 40 | 1.5.2020 | 5 | ? |
999 | 2000 | 30 | 1.6.2020 | 6 | ? |
The adj. salary should be aggregrated by person and month.
Any help is greatly appreciated!
Thanks in advance and best,
Max
Solved! Go to Solution.
Hi @maxabele ,
Create 2 calculated Columns
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
@maxabele , Try like
New column =table[Salary]*table[% Working Time]/100.0
New Measure =sumx(Table, table[Salary]*table[% Working Time]/100.0)
Thank you! With your formula, it's adding the rows for the same person and month up. For instance, in this example for employee 123 the result for month 4 is: 1900 instead of 950.
Hi @maxabele ,
Create 2 calculated Columns
Regards,
Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)
Works fantastic, thank you so much!!
Hi @maxabele ,,
Are you looking for something like this?
Can you share the expected output.
Regards,
Harsh Nathani
Hi Harsh, thank you for your response.
The expected output is:
Salary Cost = 1000* 95% (Average 100 & 90) + 2000*50% = 1950
Month | Salary Cost |
4 | 1950 |
5 | 1600 |
6 | 1300 |
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |