Forum Discussion
PreviousYear() Function doesn't work
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.
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
3 Replies
- mahoneypatMicrosoft Employee
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
- Greg_DecklerCommunity Champion
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-TITHW/m-p/434008 - os_caFrequent Visitor
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