Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Employee Count Per Month DAX Not Working

Hello,

 

I am trying to compare the number of absences against total staff count month on month for a 12 month period.

 

I was using this formula to work out the staff count per month:

Staff Count Per Month =
VAR selectedDate = MAX('Date'[Date])
RETURN
SUMX('IT Area Count Data',
VAR EmployeeStartDate = 'IT Area Count Data'[Employment Start]
RETURN IF(EmployeeStartDate <= selectedDate, 1, 0))
 
I have used this formula in other reports and it works perfectly but in this report it seems to be working oddly:

I have had a look at my data model but nothing seems out of sorts can anyone tell me why this is happening. The data used in this formula contains the Employee ID number, their IT Area and their Employment Start Date. The instance of absence measure comes from a seperate absence table. 

 

Thanks!

4 Replies