This is coming out to be a date format beast mode. How can i change this to integer?

(((DATE - Lag(DATE,1) over (partition by ID,FAMILY order by INVOICE))))


Best Answers

  • trafalger
    trafalger Coach
    Answer ✓

    use a DateDIFF to calculate the number of days between the dates!

  • ColemenWilson
    Answer ✓

    Agreed on DATEDIFF(). Also, adding a *1 to a field will force it to a number:



    (CASE WHEN Field = 'Cat' THEN ID END)*1

    If I solved your problem, please "accept" my answer as the solution