Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

MoM% Calculation

Hi All,

 

I'm trying to create a MoM% calculation but for some reasons its not giving correct output.

 

Can anyone help me here?

 

Measure Used:

 

MQR MoM% =
    VAR __PREV_MONTH =
        CALCULATE(
            [MQR],
            DATEADD('F_MARKETING_RESPONSE'[Month-Year].[Date], -1, MONTH)
        )
    RETURN
        DIVIDE([MQR] - __PREV_MONTH, __PREV_MONTH)

 

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    hmm Ok, but that doesnt solve my problem to represnt data in a visual like below

    However I found a work around by creating a different calendar table and making few measures.

     

  • negi007's avatar
    negi007
    3 years ago

    Anonymous  there seems to be an issue with the dates in your table. so keep it simple. i have created a seperate date table which will be used to filter the data from the main table.

     

    i have also created calc column in the dimdate table like below

     
     
     
     

    you can add more calc column as per your need in the dimdate table. Below is the result you were looking for

     

    let me know if it works for you. thanks

     

7 Replies

  • negi007's avatar
    negi007
    Community Champion

    Anonymous 

    i can see your formuala is slighly incorrect. You can create a measure like below

     

    MoM Vol Change =
    var cm_vol=CALCULATE([sales)],DATEADD('Calendar'[Date],0,MONTH))
    var pm_vol = CALCULATE([sales],DATEADD('Calendar'[Date],-1,MONTH))
    return
    DIVIDE(cm_vol,pm_vol,0)