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

  • ST_Superman
    ST_Superman Domo Employee

    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

  • sarahi6
    sarahi6 Member
    edited December 2022