Forum Discussion
Employee turnover/total headcount
- 6 years ago
Hi diederd ,
We can create a measure using following formula to meet your requirement:
HeadCount = COUNTROWS ( DISTINCT ( SELECTCOLUMNS ( FILTER ( 'Table', OR ( AND ( 'Table'[End Date] >= MAX ( 'calendar'[Date] ), 'Table'[Start Date] <= MIN ( 'calendar'[Date] ) ), AND ( ISBLANK ( 'Table'[End Date] ), [Start Date] <= MIN ( 'calendar'[Date] ) ) ) ), "Name", [Name] ) ) )If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
BTW, pbix as attached.Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi diederd ,
We can create a measure using following formula to meet your requirement:
HeadCount =
COUNTROWS (
DISTINCT (
SELECTCOLUMNS (
FILTER (
'Table',
OR (
AND (
'Table'[End Date] >= MAX ( 'calendar'[Date] ),
'Table'[Start Date] <= MIN ( 'calendar'[Date] )
),
AND ( ISBLANK ( 'Table'[End Date] ), [Start Date] <= MIN ( 'calendar'[Date] ) )
)
),
"Name", [Name]
)
)
)
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
BTW, pbix as attached.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-lid-msft.
Thank you so much for your prompt response/answer.
This is simply genius!! Perfect in the way in which it answers the question raised by our HR team and get's me out of a tight spot ;-) Thank you again for your help in providing the solution.