Forum Discussion

Tamara_Batista's avatar
Tamara_Batista
New Member
1 year ago

Wrong results for Quick Measure - MoM%

Hello everyone!

 

I created a quick measure to calculate variation MoM% but in some periods the result is correct and wrong in others.

Does someone have any idea of why this happens?

Above is the correct result.

 

 

measure shown in visual above:

Var 12 meses =
VAR __PREV_MONTH = CALCULATE(SUM('Vendas'[Valor Total]), DATEADD('Tempo'[Data], -12, MONTH))
RETURN
    DIVIDE(SUM('Vendas'[Valor Total]) - __PREV_MONTH, __PREV_MONTH)

 

 

 

 

2 Replies

  • Tamara_Batista - this looks more like a Year-over-Year calculation to me as you are comparing Jan 23 against Jan 24 etc. 

     

    Is the same var% measure being used in the table and the line chart?

    Are they on the same page?

    Are they being affected by the same filter context?

     

    For PREV_MONTH (year) have you tried:

     

    CALCULATE(SUM('Vendas'[Valor Total]), DATEADD('Tempo'[Data], -1, YEAR))

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Tamara_Batista ,

     

    Whether the advice given by mark_endicott   has solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.

     

    Best Regards,

    Neeko Tang