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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Help With calculating month over month percent change quick measure

I am trying to calculate the % change month over month for the count of the ID's. Each ID entered is a new lead and hence why I am counting each ID. 

Here is my Code below: 

ID MoM% =
IF(
    ISFILTERED('Cross Sales Tracker'[Date Submitted]),
    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(
            COUNTA('Cross Sales Tracker'[ID]),
            DATEADD('Cross Sales Tracker'[Date Submitted].[Date], -1, MONTH)
        )
    RETURN
        DIVIDE(COUNTA('Cross Sales Tracker'[ID]) - __PREV_MONTH, __PREV_MONTH)
)
 
mhgottsc_0-1643213714883.pngmhgottsc_1-1643213896259.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I ended up using this and it worked but I did switch to Q/Q:

ID QoQ% =
IF(
    ISFILTERED('Dates'[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_QUARTER =
        CALCULATE(
            COUNTA('Cross Sales Tracker'[ID]),
            DATEADD('Dates'[Date], -1, QUARTER)
        )
    RETURN
        DIVIDE(
            COUNTA('Cross Sales Tracker'[ID]) - __PREV_QUARTER,
            __PREV_QUARTER
        )
)

 

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , You should date table for time intelligence

example

Month behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-1,Month))

 

 

do not use .date.

 

Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5bd4
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

I ended up using this and it worked but I did switch to Q/Q:

ID QoQ% =
IF(
    ISFILTERED('Dates'[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_QUARTER =
        CALCULATE(
            COUNTA('Cross Sales Tracker'[ID]),
            DATEADD('Dates'[Date], -1, QUARTER)
        )
    RETURN
        DIVIDE(
            COUNTA('Cross Sales Tracker'[ID]) - __PREV_QUARTER,
            __PREV_QUARTER
        )
)

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.