I have been using the below formula for headcount - this appears to work correctly for top line number of colleagues - however when it is filtered down to team level it doesn’t give the correct headcount.
I essentially need the exact number of employees who are with us on any given date.
My headers on my data include:
Leaving code Description
No of Colleagues = CALCULATE([Joining],FILTER(ALL(Dates[Date]),Dates[Date]<=AVERAGE(Dates[Date])))-CALCULATE([Leaving],FILTER(ALL(Dates[Date]),Dates[Date]<=AVERAGE(Dates[Date])),ALL('CORE DATA'[Leaving Code Description]))
Can anyone help please?