Forum Discussion

zraopingm's avatar
zraopingm
Icon for Helper IV rankHelper IV
1 year ago
Solved

previous month measure when year changes

Hello Friends,

this measure works for me really well for a quick look at previous month's data (from "today" current month)  except when in the month of Jan. when year is no longer "today"... see below

 

Thank you - Zoey

 

  • Try

    Prior Month Funding =
    VAR StartDate =
        EOMONTH ( TODAY (), -2 ) + 1
    VAR EndDate =
        EOMONTH ( TODAY (), -1 ) + 1
    VAR Result =
        CALCULATE (
            [Tasks Approved],
            DATESBETWEEN ( 'Date'[Date], StartDate, EndDate )
        )
    RETURN
        Result
    

2 Replies

  • Try

    Prior Month Funding =
    VAR StartDate =
        EOMONTH ( TODAY (), -2 ) + 1
    VAR EndDate =
        EOMONTH ( TODAY (), -1 ) + 1
    VAR Result =
        CALCULATE (
            [Tasks Approved],
            DATESBETWEEN ( 'Date'[Date], StartDate, EndDate )
        )
    RETURN
        Result