Forum Discussion

AmeenVanakar's avatar
AmeenVanakar
Advocate II
1 year ago
Solved

Quick Measure - MOM Change Error

Hi, I am trying to add a MOM change % using a quick measure & plot it in a graph, however when I filter using dates the chart throws an error with a message as shown in screenshot below. Is there a...
  • Ritaf1983's avatar
    1 year ago

    Hi AmeenVanakar 
    Mark your date table as "date table"

    and modify the formula :

    [ MoM Growth %] =
        VAR __PREV_MONTH =
            CALCULATE(
                SUM('Fact_Primary Raw Data'[Value]),
                DATEADD('_FY Calendar'[Date], -1, MONTH)
            )
        RETURN
            DIVIDE(SUM('Fact_Primary Raw Data'[Value]) - __PREV_MONTH, __PREV_MONTH)
    Result :

    or if you need it with the hierarchies:

    P.S

    My recommendation, from the perspective of effective data visualization, is not to use two such metrics on the same graph. Users will struggle to understand which line corresponds to which metric, and once there are two lines on the same graph, our brain unconsciously starts comparing them. This is misleading because these are two entirely different metrics with completely different scales and proportions. I strongly recommend separating them into two distinct graphs, one below the other, each with its own Y-axis.

    The pbix is attached with both options

    If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.