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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Gavin_Shales
Frequent Visitor

Dax for Month to Month Variance

Hello all,

 

I am trying to create a dashboard which will be comparing data over two months. I have used a "Quick New Measure" which is great for showing what the % difference is. What I can't work out is how I can modifiy this DAX to show the numerical difference between the two months? Please could someone take a look at my DAX below and suggest how I can amend this to show the Numerical difference and not the %.

 

Thank you very much. Gavin

 

 

 

Count of Version MoM% =
(IF(
ISFILTERED('TPL Pet Test'[Version]),
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('TPL Pet Test'[Version]),
DATEADD('TPL Pet Test'[Version].[Date], -1, MONTH)
)
RETURN
DIVIDE(COUNTA('TPL Pet Test'[Version]) - __PREV_MONTH, __PREV_MONTH)
)
)

 

 

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Gavin_Shales

 

You could modify your measure as below then you will get the numerical difference between the two months.

 

Count of Version MoM% =
 (
    IF (
        ISFILTERED ( 'TPL Pet Test'[Version] ),
        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 ( 'TPL Pet Test'[Version] ),
                DATEADD ( 'TPL Pet Test'[Version].[Date], -1, MONTH )
            )
        RETURN
            COUNTA ( 'TPL Pet Test'[Version] ) - __PREV_MONTH
    )
)

Hope it can help you !

 

Best Regards, 

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Cherry,

 

Thanks for taking a look at this. Sorry for the late response, I have not had the chance to re-visit this until now.

 

Unfortunately the Dax isn't working as I hoped it would. Instead of showing the difference its just showing the total of both months combined.

 

Regards

Gavin

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors