Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

DAX query EARLIER function work for date range

I want to count number of records before date. For example, Iteration.StartDate Iteration.EndDate NewStateWithStartDate.ChangedDate Column 01-01-2021 00:00 18-07-2021 00:00 15-07-2021...
  • V-lianl-msft's avatar
    4 years ago

    Hi Anonymous ,

     

    Please try to create DAX like below:

    Column 2 = COUNTROWS(FILTER('Table','Table'[Iteration.StartDate]<='Table'[NewStateWithStartDate.ChangedDate]&&'Table'[Iteration.EndDate]<='Table'[NewStateWithStartDate.ChangedDate]))


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