Forum Discussion

cwnoll's avatar
cwnoll
Frequent Visitor
6 years ago
Solved

Help with MoM% change using date filter

I have a date filter on my dashboard, that is currently set at 1/1/2019(start) and 1/27/2020(end). I have a matrix with Mth-Yr in columns and data in each column. I am trying to calculate the % change in Jan 2020 to Dec 2020, but the problem is, there are only 27 days in the current month of Jan 2020. So what is the best way, or is there a way, to calculate MoM% change, given the date filter, to compare Jan 1-27 2020 to Dec 1-27 2019, instead of Dec 1-31 2019?

 

Thank you in advance

  • Thanks all for the quick responses, but I found a solution that works. I am using the following measure to accomplish this.

     

    Trans MoM Var =
    VAR __PREV_MONTH =
    CALCULATE([Transport MTD],DATEADD(FILTER(DATESMTD('Calendar'[Date]),'Calendar'[Date]<TODAY()),-1,MONTH))
    RETURN
        DIVIDE(SUM('TD'[Transport]) - __PREV_MONTH, __PREV_MONTH)

3 Replies