how to the find difference between dates ( in days ) that are in one column?

sarahi6
sarahi6 Member
edited December 2022 in Beast Mode

I am currently trying to figure out the days between each customers transaction. I know you can use the DATEDIFF function but what if my dates are all in one column?


Any suggestions?

Tagged:

Answers

  • can you try:

    DATEDIFF(`Transaction Date`,LAG(`Transaction Date`,1) OVER (PARTITION BY `Customer ID` ORDER BY `Transaction Date`))
    

    I'm not sure if LAG() works in beastmode or not


    “There is a superhero in all of us, we just need the courage to put on the cape.” -Superman
  • sarahi6
    sarahi6 Member
    edited December 2022