Forum Discussion
Yolo_pbi
2 years agoFrequent Visitor
Inactive relation causing the filter to not work
Hi Guys, Need help with dealing with an inactive relationship below in HR data. Context: I am trying to get the total active employees based on the date slicer from date table and the c...
some_bih
2 years agoCommunity Champion
Hi Yolo_pbi not enought infos to provide some sound solution.
Still, try v2
Headcount v2 =
VAR __max_date=MAX('Date'[Date])
RETURN
CALCULATE(
DISTINCTCOUNT(DET[Staff Member]),
FILTER(
DET,
DET[Joined] <= __max_date &&
(
DET[Last Date Worked] > __max_date || ISBLANK(DET[Last Date Worked])
)
)
)