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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
GThurairajah
Regular Visitor

DAX formula to create date comparisons

Hello,

 

I have a question about how to control the date comparisons in PowerBI through a DAX formula.

 

What I have is a Date column where I have date ranges from Jan 2016 to August 2017 and each days respective sales.

 

What I want to do is Create a time series that compares TY Sales for a specific point in time with Last Year Sales but its not the same period. We use fiscal dates so August 20th of 2017 must be compared with August 21st of 2016. So the sametimeperiod function doesnt work. I tried using a formula to return values of the tables - 364 days which works but it doesnt work the same way as sametimeperiod. It just returns a graph with a gap from August 21st 2016 to August 20th 2017.

 

If anyone is able to help it would be greatly appreciated!

 

-Gaj

 

 

1 REPLY 1
Anonymous
Not applicable

@GThurairajah,

Please check if the following similar thread and blog help. If you still don’t get expected result, please share sample data of your table and post DAX you currently use.

http://community.powerbi.com/t5/Desktop/Fiscal-Year-to-Date/m-p/131453 
https://www.powerpivotblog.nl/using-time-intelligent-powerpivot-functions-with-fiscal-year/

Regards,
Lydia

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.

Top Solution Authors
Top Kudoed Authors