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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

% increase or decrease for same months in different years

I am trying to get the percentage increase or decrease in revenue of a month from different years: example: % increase or decrease in revenue for May 2020 and May 2021.

 

I tried using MoM %, but it only compares with the month prior. Is there another measure I could use? Or is there a way I could do this?

 

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

Hi @Anonymous ,

Has your problem been solved? 
According to your description, I create a sample.

vkalyjmsft_0-1664789445079.png

Here's my solution, create a measure.

Measure =
VAR _Pre =
    CALCULATE (
        SUM ( 'Table'[Revenue] ),
        SAMEPERIODLASTYEAR ( 'Table'[YearMonth] )
    )
VAR _Diff =
    MAX ( 'Table'[Revenue] ) - _Pre
RETURN
    IF ( _Pre = BLANK (), BLANK (), DIVIDE ( _Diff, MAX ( 'Table'[Revenue] ) ) )

Get the result.

vkalyjmsft_1-1664789512116.png

I attach my sample below for your 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-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

Has your problem been solved? 
According to your description, I create a sample.

vkalyjmsft_0-1664789445079.png

Here's my solution, create a measure.

Measure =
VAR _Pre =
    CALCULATE (
        SUM ( 'Table'[Revenue] ),
        SAMEPERIODLASTYEAR ( 'Table'[YearMonth] )
    )
VAR _Diff =
    MAX ( 'Table'[Revenue] ) - _Pre
RETURN
    IF ( _Pre = BLANK (), BLANK (), DIVIDE ( _Diff, MAX ( 'Table'[Revenue] ) ) )

Get the result.

vkalyjmsft_1-1664789512116.png

I attach my sample below for your 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.

VahidDM
Super User
Super User

Hi   

The solution depends on how you want to visualize your data and your data model, but you can create something like this:

Measure = 
VAR _CurrentDate =
    MAX ( Table[Date] )
VAR _LastYear =
    YEAR ( _CurrentDate ) - 1
VAR _SameMonthLastYear =
    DATE ( _LastYearMONTH ( _CurrentDate )DAY ( _CurrentDate ) )

.

.

.

 

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

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

amitchandak
Super User
Super User

@Anonymous , For last year you can opt for one of these

 

last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
Previous year Month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth(dateadd('Date'[Date],-11,MONTH)))

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

 

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs&t=145s

 

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

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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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