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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jasmeet_ia
Regular Visitor

Year over year % Change

Hi there, I am new to powerbi and struggling with this. From the table I have added 'Country' as Rows and 'Year' as column.  I am trying to add a column next to 2023, showing % change in 2023 and 2022. I request help with this, as I am not able to figure this out on my own. Please!

 

Screenshot_2.png

1 ACCEPTED SOLUTION

Hi @Anonymous - Thanks for your suggestion. But I am still not able to achilve what I looking for. Let me rephrase my question, maybe I was not very clear previously.. I really appreciate your help!

 

This is how my raw data looks like, with more rows:

MonthREADER LOCATIONReads
Jan-20Canada1,293,579
Jan-20United States1,253,969
Jan-20India353,493
Feb-20France349,513
Mar-20United Kingdom289,964
Jan-21Australia181,488
Jan-22Brazil130,479
Jan-23South Africa77,071

 

and this is what I want to achieve in one of my dashboards:

 

jasmeet_ia_0-1705517748876.png

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @jasmeet_ia 

 

@Greg_Deckler Good share!

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Data"

vnuocmsft_0-1705472227464.png

 

You can create a measure to calculate the year over year change in price.

 

vnuocmsft_1-1705472428842.png

Measure = 
    var current_year = SELECTEDVALUE('Data'[2023])
    var last_year = SELECTEDVALUE('Data'[2022])
RETURN DIVIDE(current_year - last_year, last_year)

 

Change the format of measure to “%”

vnuocmsft_3-1705472558608.png

 

Here is the result

vnuocmsft_2-1705472499921.png

 

Regards,

Nono Chen

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

 

Hi @Anonymous - Thanks for your suggestion. But I am still not able to achilve what I looking for. Let me rephrase my question, maybe I was not very clear previously.. I really appreciate your help!

 

This is how my raw data looks like, with more rows:

MonthREADER LOCATIONReads
Jan-20Canada1,293,579
Jan-20United States1,253,969
Jan-20India353,493
Feb-20France349,513
Mar-20United Kingdom289,964
Jan-21Australia181,488
Jan-22Brazil130,479
Jan-23South Africa77,071

 

and this is what I want to achieve in one of my dashboards:

 

jasmeet_ia_0-1705517748876.png

 

 

Greg_Deckler
Community Champion
Community Champion

@jasmeet_ia You can create a PY measure like this:

NC Intenet Sales (PY) = 
    VAR __MinPYDate = MIN('Dates'[Prior Year Date])
    VAR __MaxPYDate = MAX('Dates'[Prior Year Date])
    VAR __PYCalendar = CALENDAR(__MinPYDate, __MaxPYDate)
    VAR __Table = 
        SUMMARIZE(
            ALL('FactInternetSales'),
            'FactInternetSales'[OrderDate],
            "__Sales", SUM('FactInternetSales'[SalesAmount]))
    VAR __Result = SUMX( FILTER( __Table, [OrderDate] IN __PYCalendar), [__Sales] )
RETURN
    __Result

 

This may also help, You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...

 

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.