Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Anonymous
Not applicable

Extra MoM% computed

I calculated the MoM% with the "Quick Measure" option. The problem is that it adds an extra month that doesn't exist or assumes that the sales are zero in the next month. For example, I have data only until January 2024 and the used MoM% computes for February 2024 also (assumes that sales for February 2024 are zero then the MoM% this month is -100%). I would like to modify the measure to compute MoM% only until January 2024. I've tried a bunch of alternatives but nothing worked.

ipa314_0-1706763155039.png

 

Sales MoM% =
IF(
    ISFILTERED('Sheet1'[Date]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    VAR __PREV_MONTH = CALCULATE(
        SUM('Sheet1'[Sales]),
        DATEADD('Sheet1'[Date].[Date], -1, MONTH)
    )
    RETURN
            DIVIDE(SUM('Sheet1'[Sales]) - __PREV_MONTH, __PREV_MONTH)
)
 
 
1 ACCEPTED SOLUTION
Kishore_KVN
Solution Sage
Solution Sage

Hello @Anonymous , Please use below measure and it will remove current month. 

Sales MoM% =
IF(
    ISFILTERED('Sheet1'[Date]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    VAR __PREV_MONTH = CALCULATE(
        SUM('Sheet1'[Sales]),
        DATEADD('Sheet1'[Date].[Date], -1, MONTH)
    )
    RETURN
            IF(SUM('Sheet1'[Sales]) <> BLANK(),DIVIDE(SUM('Sheet1'[Sales]) - __PREV_MONTH, __PREV_MONTH),BLANK())
)

 

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

View solution in original post

1 REPLY 1
Kishore_KVN
Solution Sage
Solution Sage

Hello @Anonymous , Please use below measure and it will remove current month. 

Sales MoM% =
IF(
    ISFILTERED('Sheet1'[Date]),
    ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
    VAR __PREV_MONTH = CALCULATE(
        SUM('Sheet1'[Sales]),
        DATEADD('Sheet1'[Date].[Date], -1, MONTH)
    )
    RETURN
            IF(SUM('Sheet1'[Sales]) <> BLANK(),DIVIDE(SUM('Sheet1'[Sales]) - __PREV_MONTH, __PREV_MONTH),BLANK())
)

 

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

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors