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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.