cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lparks
Regular Visitor

Month Over Month % Change Formula

Hello, 

 

I'm new to power bi and need help with a formula for percent change MOM, please. I would like the percent change as a percentage, but below is the formula of what I want. I also included a table of what the data look like to help. Can someone help, please

 

Total current month clicks - total previous month clicks / total previous month * 100 / 1

 

 

Capture.PNG

 

 

 

1 ACCEPTED SOLUTION
v-kalyj-msft
Community Support
Community Support

Hi @lparks ,

According to your description, here's my solution.

1.Create a calculated column to calculate the sum total clicks for each month.

SUM Total Clicks =
SUMX (
    FILTER ( 'Table', 'Table'[Month] = EARLIER ( 'Table'[Month] ) ),
    'Table'[Total Clicks]
)

2.Create a measure.

SUM Total Clicks MOM% =
VAR _Previous =
    MAXX (
        FILTER ( ALL ( 'Table' ), 'Table'[Month] = MAX ( 'Table'[Month] ) - 1 ),
        'Table'[SUM Total Clicks]
    )
VAR _DIFF =
    MAX ( 'Table'[SUM Total Clicks] ) - _Previous
RETURN
    DIVIDE ( _DIFF, _Previous )

3.Get the expected result, as your snapshot shows part of the data, I get a great value.

vkalyjmsft_0-1640075545049.png

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

 

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

 

View solution in original post

3 REPLIES 3
v-kalyj-msft
Community Support
Community Support

Hi @lparks ,

According to your description, here's my solution.

1.Create a calculated column to calculate the sum total clicks for each month.

SUM Total Clicks =
SUMX (
    FILTER ( 'Table', 'Table'[Month] = EARLIER ( 'Table'[Month] ) ),
    'Table'[Total Clicks]
)

2.Create a measure.

SUM Total Clicks MOM% =
VAR _Previous =
    MAXX (
        FILTER ( ALL ( 'Table' ), 'Table'[Month] = MAX ( 'Table'[Month] ) - 1 ),
        'Table'[SUM Total Clicks]
    )
VAR _DIFF =
    MAX ( 'Table'[SUM Total Clicks] ) - _Previous
RETURN
    DIVIDE ( _DIFF, _Previous )

3.Get the expected result, as your snapshot shows part of the data, I get a great value.

vkalyjmsft_0-1640075545049.png

I attach my sample below for reference.

Best Regards,
Community Support Team _ kalyj

 

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

 

lparks
Regular Visitor

Hi @amitchandak thank you so much. Do I need to put all of the info in one formula?

amitchandak
Super User
Super User

@lparks , You can create this month vs last month measure using date table 

 

MTD Sales = CALCULATE(SUM(Table[Total click]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Table[Total click]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))

last month Sales = CALCULATE(SUM(Table[Total click]),previousmonth('Date'[Date]))
next month Sales = CALCULATE(SUM(Table[Total click]),nextmonth('Date'[Date]))

 

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.

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA



New Power BI Features
Datamarts: https://youtu.be/8tskWsJTEpg
Field Parameters : https://youtu.be/lqF3Wa1FllE?t=70
Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin !! Proud to be a Super User!
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
!! Subscribe to my youtube Channel !!

Helpful resources

Announcements
June 2022 update 768X460.jpg

Check it out!

Click here to read more about the June 2022 updates!

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power BI Dev Camp Session 23 768x460.jpg

Check it Out!

Mark your calendars and join us on Thursday, June 30 at 11a PDT for a great session with Ted Pattison!

June 20 episode 7 with aka link 768x460.jpg

The Power BI Community Show

Join us on June 20 at 11 am PDT when Kim Manis shares the latest on Azure Synapse analytics, the Microsoft Intelligent Data Platform, and notable Power BI Updates from Microsoft Build 2022.

Top Solution Authors
Top Kudoed Authors