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 POWER BI Community,
I need your help with a formula. I would like to know the number of employee I have got at the start of any given month. This is the formula I am currently using:
The thing is that formula will also took into consideration if an employee is hired on the first day of the month. In the example below (highlighted), you can see that by substracting leavers and adding new starters from the previous month, you don't get the right number for August and this is due to a new recruit on 01/09. It is almost like I need to adapt the formula to give me the count of employee on the last day of the previous month?
Thanks for your help.
@corange
Can you provide a sample pbix, the SubcontractorMonthStart is not clear without a sample to test.
Regards
Paul
Hi,
Just following up on my post. Any feedbaack on how I could do it based on the sample file?
Thank you.
Hi @V-pazhen-msft & @amitchandak
My apologies but I was on annual leave. Please find my sample here: https://1drv.ms/u/s!AiS7XVNuQsBCdEmmPcC7MgNIRqQ
in the sample, you will see that the first row matches, (303 + 6 -16 =293). However, when we go to Sep 2019-2020 it doesnt (293-13+10 = 296. This is because we have that one employee (ID446) that started on the 1st of September. I am more looking into having the count of employee for the very last day of the month rather than the start.
Please let me know if you need more clarifications to help me out.
Thanks.
@corange , Your formula is not clear, but you can try firstnonblankvalue , that will take the first date, the second argument is your formula, which you can change
calculate( firstnonblankvalue('Calendar'[Date], countrows(Drivers)) ,ALLEXCEPT('Calendar','Calendar'[Month]))
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |