Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Our next Qlik Insider session will cover new key capabilities. Join us August 11th REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
royalapps
Contributor
Contributor

Difference Between two dates

Hi

How to calculate difference between two dates

I have two date fileds

 

First record

One is order expected date 22 may 2020

Second is order delivered date 25 may 2020

 

The out is minus 3 days

 

Second  record

One is order expected date 22 may 2020

Second is order delivered date 20 may 2020

Here's the difference is 2 days

 

So here I want difference between these two dates

 

Based on these difference days I want to create calucalte dimension

Minus three days order delayed

If 2 days order delivered

Please help me on this

Thanks

 

 

Labels (1)
1 Reply
MayilVahanan

Hi @royalapps 

Try like below

Load *, If(DayDiff < 0, 'order delayed', 'order delivered') as Status;

Load * , interval([order expected date] -[order delivered date], 'D') as DayDiff from yoursource;

Thanks & Regards,
Mayil Vahanan R