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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Year wise Month on Month comparison Dax

I have the data  from 2018 to 2025 . this data looks like  . i want comparision based on difference selection. if i select 1  Range 2019 January  and 2018 Januray value comparision . below formula used in Excel 

=(R5-F5)/F5

 

so created below formula for the measure 

 

n =
SELECTCOLUMNS(
    GENERATESERIES(1,12),
    "n", [Value]
)
 
Calculated column 
 
MonthSN = (Base[Year value].[Year]*12+[Month - Number])

 

 

MoM Difference =
VAR _currentmonthSN = MAX(Base[MonthSN])
VAR _n = SELECTEDVALUE(n[n])
VAR rate =
    DIVIDE(
        SUM(Base[Value]),
        CALCULATE(
            SUM(Base[Value]),
            ALL(Base),
            Base[MonthSN]=_currentmonthSN-_n
        )
    )^(1/_n)
    -1
RETURN
    IF(rate<>-1, rate, "")

 

 

Base Table :

 

Date                             Value                          Region

01-01-2018                  23                               EAST

01-01-2018                  43                               WEST

01-02-2018                  23                               EAST

01-02-2018                  43                               WEST

01-03-2018                  23                               EAST

01-03-2018                  43                               WEST

----

------

01-01-2019                 36                               EAST

01-01-2019                 62                               WEST

01-02-2019                 23                               EAST

01-02-2019                 53                               WEST

01-03-2019                 83                               EAST

01-03-2019                 93                               WEST

 

 

Looking for support .. thanks in advance ..

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.