Forum Discussion
harshagraj
Post Partisan
5 years agoDatediff for alternate rows
Hello All, How do it get date diff in sec. It should be group by ModelNr and Station Nr. Eg: Datediff(17-11-2020 14:46:02,17-11-2020 14:46:11,Sec)
amitchandak
Super User
5 years agoharshagraj , Try a column like
datediff(minx(filter(table, [ModelNr] =earlier([ModelNr]) && [Station Nr] =earlier([Station Nr]) && [prestoparrivalC] > earlier([prestoparrivalC])),[prestoparrivalC]),[prestoparrivalC] , second)
harshagraj
Post Partisan
5 years agoHello thankyou so much for the reply. I tried inserting a Measure and I am on Direct Query mode. I am getting below error. I am not getting a column after Earlier. Am i missing something? Please help