Forum Discussion

GThurairajah's avatar
GThurairajah
Regular Visitor
9 years ago

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