Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dynamic Date Range

Hi guys,   I have got some HR data and would like to see the number of active employees at any given date range ([SelectionDate]) and visualise them in a column chart with x axis being the date ran...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  Anonymous ,

     

    Please try:

    ActiveInd = 
    VAR _T=FILTER('DataTable',[HireDate]<=MAX('SelectionDates'[SelectionDateRange]) && [TermDate]>=MAX('SelectionDates'[SelectionDateRange]))
    RETURN COUNTROWS(_T)

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.