hi folks, i want to filter my data table for active projects using a measure that counts all active projects. My measure, "Active Projects", compares the start and end date selected by users on a slicer to the start and end dates of the projects listed in the table. listed. Where the dates line up, that project is deemed to be active. and is counted into the total Active Projects number. so that is a single number.
I want to filter my data for these Active projects. How can this be done?
Power Query:
Active Projects =
VAR SelectedStartDate = MIN('ExtXLFileDates'[Date])
VAR SelectedEndDate = MAX('ExtXLFileDates'[Date])
RETURN
CALCULATE(
DISTINCTCOUNT('ForwardPlan'[Description]),
FILTER(
'ForwardPlan',
('ForwardPlan'[Activity Start] <= SelectedEndDate && ('ForwardPlan'[Activity End] >= SelectedStartDate))
||('ForwardPlan'[Activity Start] >= SelectedEndDate && ('ForwardPlan'[Activity End] <= SelectedStartDate))
||('ForwardPlan'[Activity Start] < SelectedStartDate && 'ForwardPlan'[Activity End] <= SelectedEndDate && ('ForwardPlan'[Activity End] >= SelectedStartDate))
||('ForwardPlan'[Activity Start] > SelectedStartDate && 'ForwardPlan'[Activity Start] <= SelectedEndDate && ('ForwardPlan'[Activity End] >= SelectedEndDate))
))
I want to filter my data for these Active projects. How can this be done?