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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kozlevchar
Resolver I
Resolver I

PREVIOUSYEAR not returning data

PREVIOUSYEAR (Doesn't fail but returns no data).  The Date column in my Calander is set to "Date".  Here's the formula:

 

Spend PY = CALCULATE(SUMX('Key Measures', 'Key Measures'[Spend]) , PREVIOUSYEAR('Calendar'[Date]))
 
Any help/ideas would be much appreciated.
 
Thanks,
 
John
1 ACCEPTED SOLUTION
kozlevchar
Resolver I
Resolver I

Thank you for the reply.  I kept working with it and when I took the SUMX out fo the formula it worked and now shows data.  Don't quite understand why as I thought you had to use another formulas with CALCULATE.  

 

Thanks,

 

John

View solution in original post

4 REPLIES 4
kozlevchar
Resolver I
Resolver I

Thank you for the reply.  I kept working with it and when I took the SUMX out fo the formula it worked and now shows data.  Don't quite understand why as I thought you had to use another formulas with CALCULATE.  

 

Thanks,

 

John

littlemojopuppy
Community Champion
Community Champion

Hi @kozlevchar check that you have a date table and that it's marked as one.  PREVIOUSYEAR is a time intelligence function and requires a date table in order to work properly.

Hi,

 

Thank you for the reply.  I have  Date table and it's marked as a Date Table

@kozlevchar can you share the pbix?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.