Forum Discussion
Anonymous
3 years agoNot applicable
Multiples dates in one table
Hi I have the following problem. I have a table with information of all the employees who are active and inactive of the company. In this table i have a date of admission and for those inactive e...
- 3 years ago
Anonymous , Please refer to my blog or the attached files after signatures
v-yanjiang-msft
3 years agoCommunity Support
Hi Anonymous ,
According to your description, you want to show in the current Date from Date table, how many employees are there with active status. here's my solution.
1. Don't make any relationship between Empleados and Date table.
2. Create a measure.
Historic Headcount =
CALCULATE (
DISTINCTCOUNT ( Empleados[Employee] ),
FILTER (
ALLSELECTED ( Empleados ),
'Empleados'[Date of admission] <= MAX ( 'Date'[Date] )
&& (
'Empleados'[Date of leave] = BLANK ()
|| 'Empleados'[Date of leave] >= MAX ( 'Date'[Date] )
)
)
)
Get the correct result.
I attach my sample below for your reference.
Best Regards,
Community Support Team _ kalyj
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.