Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request 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.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 49 | |
| 44 |