Forum Discussion
Calculations with DAX Filters - Voluntary/Involuntary Staff Turnover
- 5 years ago
Hi, Anonymous
According to your description, I think the problem is that the column name and value don't match.
You need to modify the code: 'Emp Master File'[Voluntary/Involuntary] = "Involuntary") or 'Emp Master File'[Term Code] = "V")
It is recommended that you use countx() function to calculate, the usage of calculate (sumx(if)) is not common.
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Amit,
Thanks for your response, but that was not what I was after unfortunately.
I wanted to calculate only those employees who have been voluntary terminated using my formulas above. I hope that makes sense.
Anonymous , modification on this formula should help
Terminated in last 12
= CALCULATE(CALCULATE(COUNT('Emp Master File'[Employee Id ]),USERELATIONSHIP(Employee[Termination Date],'Date'[Date]),not(ISBLANK(Employee[Termination Date])), 'Emp Master File'[Voluntary/Involuntary] = "V"),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-12,MONTH))