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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
vanessafvg
Super User
Super User

Previous Year Calculation plotting oddly on line graph

graph.PNG

as you can see from the line graph i have a revenue measure and previous year revenue.   What i dont understand is why doesn't the PY plot the same as the revenue.

 

this is the measure for the revenue

Revenue = CALCULATE(Sum(Registrations[MRR]) + sum(Sales[RevenueNettAmount])) 

this is the measure for PY

PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR(ALLSELECTED('Fiscal Date'[Date])))

 

I would like the value to plotted on the line graph in the same way, what am i missing?  The other thing is these seem to be bring back exactly the same values

 

Capture.PNG





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




8 REPLIES 8
MalS
Resolver III
Resolver III

How does PY Revenue = CALCULATE([Revenue], SAMEPERIODLASTYEAR('Fiscal Date'[Date])) look?

ah yes sorry my mistake, the problem with that, which i did before i changed it to this was because i have a filter on date on my dashboard as in year month it brings back 0  

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




The date filter shouldn't stop SAMEPERIODLASTYEAR from working without ALLSELECTED. Any chance there was actually 0 revenue last year in your data?

nope 🙂    There is data for the previous year, but what is interesting is that its duplicating the current years data in the PY measure.. something is off..





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Yeah - strange. The only other thing I would suggest is to check the date column in the SAMEPERIODLASTYEAR formula - it needs to be a proper calendar table (no missing dates, no duplicates, must cover the entire period of your data). Otherwise, without seeing the file, I am not sure what is going on.

it comes from the dim date column in the dw so i hope its fully populated but i would think so since its in daily use in the dw.   ive obviously done something somewhere!





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




from whatCapture.PNG perspective?  see first graph for how it is plotting as opposed to revenue. 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Not sure if you noticed, but I changed the formula slightly for PY Revenue - I was wondering if that gave results that made more sense.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors