Forum Discussion
DAX Function to create sales difference between two consecutive dates
The PreviousDate VAR is returning me 31st Dec 2024. May be that's the reason why it is not working.
Hi SC30GSWNBA i see that all results are correct....
Did you download the pbix to follow thr steps?
If yes please show what is wrong
- SC30GSWNBA2 years agoFrequent Visitor
Yes, I downloaded your file. I am connected to a database and when I apply MAX(Sales Data[Date]), it gives me 31st Dec 2024 as the output rather than the latest date. Not sure why that is happening.
- Ritaf19832 years agoSuper User
Unfortunately, I can't determine the exact problem without access to your file.
There's an alternative method to access the value in the row above within a visualization context using the offset function.
Regrettably, I'm currently not at my computer and cannot provide an example. However, you can refer to the guide linked below:
https://youtu.be/C3QY0DWts8w?si=b5JhPQwq51lLw1tO