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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
HishamAT
Helper I
Helper I

Calculate the Difference in percentage

how to calculate the difference between current month in the current year and the previous year with the same month in DAX ? 

2 ACCEPTED SOLUTIONS
TomMartens
Super User
Super User

Hey @HishamAT ,

 

I recommend reading this article: https://www.daxpatterns.com/time-patterns/
This article contains almost everything what you need to know about time/date calculations using DAX.

Hopefully, this gets you started.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

RajaCSN
Advocate II
Advocate II

You can use the Dax function: Sameperiodlastyear to achieve this. Though the image is not showing the difference between a monthly value (on two given years), that can be done with a simple formula. (Diff = This year value - last year value). Hope this helps.Dax function: SameperiodlastyearDax function: Sameperiodlastyear

 

 

View solution in original post

2 REPLIES 2
RajaCSN
Advocate II
Advocate II

You can use the Dax function: Sameperiodlastyear to achieve this. Though the image is not showing the difference between a monthly value (on two given years), that can be done with a simple formula. (Diff = This year value - last year value). Hope this helps.Dax function: SameperiodlastyearDax function: Sameperiodlastyear

 

 

TomMartens
Super User
Super User

Hey @HishamAT ,

 

I recommend reading this article: https://www.daxpatterns.com/time-patterns/
This article contains almost everything what you need to know about time/date calculations using DAX.

Hopefully, this gets you started.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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