Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Count Date Rows in Last Month

Hi All,   I have a column called 'Dates' this column shows various dates.    Please can you show me the DAX to count the number of rows with dates in the last month?   Many thanks,   E
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Tim,

     

    The formula is shown below;

     

    Erected in Past Month = CALCULATE(DISTINCTCOUNT('Standing Scaffold Data'[ErCompleteDate]), PREVIOUSMONTH('Standing Scaffold Data'[ErCompleteDate]) )
     
    Sample Data:
     
    ErCompleteDate
    01/01/2020
    01/01/2021
    01/02/2021
    07/09/2019
    etc
     
    Regards,
     
    E