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

View all the Fabric Data Days sessions on demand. View schedule

Reply
YuliyaMusiyuk
Regular Visitor

Prior Year dax

Hello,

i am not sure what i am doing wrong, but my CY and PY results are the same.

CY formula used

=calculate(sum([Amount]),DATESMTD('Calendar'[Date]))

 

PY formula

=calculate(sum([Amount]),DATEADD('Calendar'[Date],-1,YEAR))

5 REPLIES 5
YuliyaMusiyuk
Regular Visitor

Could someone please assist? it's been days - and i cannot figure this out...

 

 

amitchandak
Super User
Super User

@YuliyaMusiyuk , couple of reason can be .

Calendar is not marked as date tbale. option on right click.

you are not using period columns from Calendar table 

 

Why Time Intelligence Fails - Power bi 5 Savior Steps for TI: https://youtu.be/OBf0rjpp5Hw

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

thank you very much! my Calendar is a date table, i just double checked on that.

Could you elaborate on the 2d? my data goes by day, therefore i figured i'd need to grab Calendar[Date]...

@YuliyaMusiyuk , If you take, day, month, year, or any period that should come from date table in visual

 

Also try this one

calculate(sum([Amount]),datesmtd(DATEADD('Calendar'[Date],-1,YEAR)))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Thank you! i tried that too, it is just not reading it.... I have a slicer for month and year; tried removing it, putting back - same story: my current and prior numbers match 😞 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.