Forum Discussion
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
- AnonymousNot applicable
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