DAX code
Terminations =
CALCULATE(
DISTINCTCOUNT('Employee'[EmployeeID]),
USERELATIONSHIP('Date'[Date], 'Employee'[TerminationDate])
)
Counts employees whose termination date falls within the current filter context.
Type your table and column names once. Every measure below updates.
Terminations =
CALCULATE(
DISTINCTCOUNT('Employee'[EmployeeID]),
USERELATIONSHIP('Date'[Date], 'Employee'[TerminationDate])
)
Requires an inactive relationship between the Date table and Employee[TerminationDate], activated here with USERELATIONSHIP.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Terminations.