Forum Discussion
ejafarov
Helper I
3 years agoCalculating Staff Count with DAX
Hi everyone,
I hope all of you are safe and doing well.
i want to write a query that calculates the staff count within the company by date. My Dax is below.
StaffCount = CALCULATE(COUNT(P[ID]),
FILTER(pli, P[Start_Date]<=MAX('Calendar'[Date]) && P[Resignation_date]<P[Start_Date]))
But when I filter for example Quarter 3 that only calculates the number of hiring not active employees. So basically I want to get a number of active employees when I filter one date.
Could you please help me to solve this issue?
THanks
BR,
Eshgin
ejafarov Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
2 Replies
- Mahesh0016
Super User
ejafarov Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- ejafarov
Helper I
Dear Mahesh0016, unfortunately I can not insert the file here. could you please write your e-mail so I can send file to you