Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
neerajthakur
Creator III
Creator III

Using Coalesce

Hi, I want to calculate time difference in hours and try to convert an SQL Logic to use in Qlik Sense

SQL:

DATEDIFF(minute,convert(datetime,RECEIVEDON,104),COALESCE(CONVERT(datetime,SUpdatedOn,104),CONVERT(datetime,SDATE,104)))/60

My statement in QlikSense:

(Coalesce(Date(SUpdatedOn),Date([SDATE]))-(Date([RECEIVEDON])))/60 as Time_Taken

On doing: Date([SDATE]))-(Date([RECEIVEDON]))/60 as Time_Taken, I am getting value same as in manual calculation

I am getting different values than manual calculation on using this, If I don't use coalesce value is same. Let me know how can I correct it or some other way to achieve this.

@Suraj @Anonymous @Anonymous 

Thanks & Regards,
Please Accepts as Solution if it solves your query.
1 Reply
Suraj
Partner - Contributor
Partner - Contributor

Hi  Xlitzdrama,

Can you post some sample data with required output.