Forum Discussion
DynamicsHS
Helper II
4 years agoCan you use a USERELATIONSHIP for two dates?
Hi, I want to show a table with active employees based on the year. Someone provided me with a userelationship measure to get the terminated employees to show. e.g. Terminated within = CALCUL...
tamerj1
Community Champion
4 years agoHi DynamicsHS
In this case you need to do the oppsite. You need to remove the filter from the date table and then iterate ove the table to manually count the number of employees that are active in the selected 'Date'[Date] in the filter context. Something like:
=
CALCULATE (
SUMX (
Payroll,
IF (
Payroll[Start Date] <= MAX ( 'Date'[Date] )
&& Payroll[End Date] >= MAX ( 'Date'[Date] ),
1
)
),
REMOVEFILTERS ( 'Date' )
)
DynamicsHS
Helper II
4 years ago- tamerj14 years ago
Community Champion
Instead of REMOVEFILTERS you may try CROSSFILTER to NONE