Forum Discussion
etane
Helper V
2 years agoRequest DAX For Ranked Order Date Tracking for Different Orders on Same Date
Hello. I am trying to track order velocity of how fast a customer gets to order number 2, 3, 4 and so on. So, I need to calculate differences between two order dates. However, with the curr...
- 2 years ago
Hi,
thank you for your message, and pleaes check the below pictures and the attached pbix file.
etane
Helper V
2 years ago
Hello.
I was able to adapt your DAX to my actual model. And, it accurately depicts dates by Order #. However, I can't write a measure that shows the average days it takes from one order to the other.
Below, the datediff works in calculating days it takes to make next order:
However, it doesn't work when I apply an iterative function to it to try to get the average days:
Could you please tell me what I might be missing in the "Days to 2" DAX above?
Jihwan_Kim
Super User
2 years agoHi,
I am not sure what visualization is used in you image.
expected result measure: =
AVERAGEX (
VALUES ( Sales[Customer] ),
DATEDIFF ( [Order 1 date], [Order 2 Date], DAY )
)
- etane2 years ago
Helper V
Thank you! Exactly what I am looking for: