Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I can't figure out why PreviousYear() function doesn't work. What is worng with my formula with PreviousYear()?
There are colums in a table in a report.
Product Category | Calendar Year | Total Sales | Previous Year Sales
1. It doesn't work. It returns blank.
2. It works.
Solved! Go to Solution.
Is your Date table "Marked as Date Table"? You are using the alternatekey column in DimDate. Is that the one that was validated when you made the date table?
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thanks all guys for helping me. sorry I can't speak Spanish and no idea how my post ended up here.
English version: https://community.powerbi.com/t5/Desktop/PreviousYear-Function-doesn-t-work/m-p/1484927#M617176
@os_ca 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...
Is your Date table "Marked as Date Table"? You are using the alternatekey column in DimDate. Is that the one that was validated when you made the date table?
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.