Forum Discussion
Adding a Calculated Column (Date difference) with Values Based On Multiple Rows
- 5 years ago
jadhalaoui , Not very clear. Try a new column in DAX
Column = var _1 = maxx(FILTER('Table','Table'[Name]= EARLIER('Table'[Name]) && 'Table'[unique customer sequence] < EARLIER('Table'[unique customer sequence])),LASTNONBLANKVALUE('Table'[unique customer sequence],'Table'[pickup_requested])) return datediff(_1,[pickup_requested],hour)
jadhalaoui , Not very clear. Try a new column in DAX
Column = var _1 = maxx(FILTER('Table','Table'[Name]= EARLIER('Table'[Name]) && 'Table'[unique customer sequence] < EARLIER('Table'[unique customer sequence])),LASTNONBLANKVALUE('Table'[unique customer sequence],'Table'[pickup_requested])) return datediff(_1,[pickup_requested],hour)
amitchandak - Thank you for your response.
From Transform Data > Add Column > Custom Column - I tried the following and got the error Token EoF Missing
Thanks - found out how to do it.
Getting an error about comparing values of type Number and values of type Text. Debugging as we speak.
I need to get a better command of the functions and syntax. Will be looking into it