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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Srinivas3350
Helper II
Helper II

Calculation Error

Hello,

I am trying to calculate ASP Growth when I put Year in the table it is showing correct value when i put month names in the table it is showing wrong values can anyone help me

Srinivas3350_1-1688470659325.png

;et me explain in details let say ASP growth for 2022 it is showing correct in the above picture 2022 - 53-45 = 8 and this is the DAX i am using 

ASP Growth = [ASP] - CALCULATE([ASP], PREVIOUSYEAR('Dim Time'[Full_Date]))


and when I put month in the table the values showing wrong i dont know how to put month filter in this dax I tried so many ways
Srinivas3350_2-1688470823302.png


2022- january the value should be 67-45 = 22 but it is showing 17 

this is my month & year column 'Dim Time'[FIN_MONTH] & 'Dim Time'[FIN_YEAR] and [ASP] is a measure. can anyone help me please. Thanks in Advance

 

Thanks

Srinivas




 

 

3 REPLIES 3
johnt75
Super User
Super User

Try

ASP Growth =
[ASP] - CALCULATE ( [ASP], DATEADD ( 'Dim Time'[Full_Date], -1, YEAR ) )

Thank you, I have added this  DAX but still the values are not correct is it because we are using company calender 

Srinivas3350_0-1688475742400.png

 

 

It could be. There's a couple of things you can check. Make sure that there is an entry for every day from Jan 1st to Dec 31st for each year in your data. Also, make sure that you have marked the calendar table as a date table. If both of those are OK then it should work.

Helpful resources

Announcements
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.