Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Count all entries last month

Hi, im wondering that this topic is not found here.   I have a table with record ids, dates. This is related to an calendar table.   I just want to count the records which have a date from last ...
  • ryan_mayu's avatar
    ryan_mayu
    6 years ago

    Anonymous 

    please try this

    Measure = 
    VAR lastmonth=EOMONTH(today(),-2)+1
    return CALCULATE(COUNT('Table'[record]),DATESBETWEEN('Table'[date],lastmonth,EOMONTH(lastmonth,0)))