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.
I have been trying to create a dax measure to dynamically calculate employee headcount every month based on existing staff, new staff and exited staff. HELP!!!
Solved! Go to Solution.
Hi @Osaz,
All the staff IDs are unique. In other words, all the IDs are new ID.
How to define the existing staff, new staff, and existed staff?
BTW, don't post private data or sensitive data here.
Best Regards,
Dale
Hi Osaz,
It's for your privacy and data security. It's up to you to keep or delete the link.
Maybe my guess is correct. Please check out the demo in the Private Message.
New Staff Count = COUNT(MasterList[Staff ID])
Existed Staff = CALCULATE ( COUNT ( MasterList[Staff ID] ), FILTER ( ALL ( 'Invoked Function'[Date] ), 'Invoked Function'[Date] < MIN ( 'Invoked Function'[Date] ) ) )
Existing Staff = CALCULATE ( COUNT ( MasterList[Staff ID] ), FILTER ( ALL ( MasterList ), MasterList[DOE] < MIN ( 'Invoked Function'[Date] ) && ( MasterList[PRExit Date] > MAX ( 'Invoked Function'[Date] ) || ISBLANK ( MasterList[PRExit Date] ) ) ) )
Best Regards,
Dale
Hi @Osaz,
Could you please mark the proper answer as a solution?
Best Regards,
Dale
Hi @Osaz,
Did you have any issues? What can we help you? It would be great to post a sample of your data.
Best Regards,
Dale
Hi @Osaz,
All the staff IDs are unique. In other words, all the IDs are new ID.
How to define the existing staff, new staff, and existed staff?
BTW, don't post private data or sensitive data here.
Best Regards,
Dale
all the id's are unique, however, we have a hire date and an exit date. How do I marry the two dates in order to establish employee headcount on any given date.
Should I delet the link, though
Osaz
Hi Osaz,
It's for your privacy and data security. It's up to you to keep or delete the link.
Maybe my guess is correct. Please check out the demo in the Private Message.
New Staff Count = COUNT(MasterList[Staff ID])
Existed Staff = CALCULATE ( COUNT ( MasterList[Staff ID] ), FILTER ( ALL ( 'Invoked Function'[Date] ), 'Invoked Function'[Date] < MIN ( 'Invoked Function'[Date] ) ) )
Existing Staff = CALCULATE ( COUNT ( MasterList[Staff ID] ), FILTER ( ALL ( MasterList ), MasterList[DOE] < MIN ( 'Invoked Function'[Date] ) && ( MasterList[PRExit Date] > MAX ( 'Invoked Function'[Date] ) || ISBLANK ( MasterList[PRExit Date] ) ) ) )
Best Regards,
Dale
thank you. yeah, will make sure to review before posting.
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 |