Forum Discussion

DeanStearn's avatar
DeanStearn
New Member
2 years ago
Solved

Countrows for previousmonth

Hi, hopefully somebody can help me with this.   I am trying to get a count of all rows for the previous month and have tried different solutions. There are similar posts to this problem, but none o...
  • Ahmedx's avatar
    2 years ago

    pls try this

     

     

    Measure=
    VAR _Start =EOMONTH( TODAY(),-2)+1
    VAR _End = EOMONTH( TODAY(),-1)
    
    RETURN
    CALCULATE(
        COUNTROWS(Data),
        USERELATIONSHIP(Data[Created], 'Calendar'[Date]),
        DATESBETWEEN('Calendar'[Date] ,_Start,_End
    )