Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Computation with dates

Hello,

I hope some can help me with may question.

I try do compare Dates and bring into a seperate column the result like delay or in time. As you can see from the short Picture it Looks ok, but the last record say late but the Plan date is in the future!

I believe this is coming because the field is empty in the database. So how can I say in an Expressen:

The Formular obove explained should run, but If this field is empty please compare today with the plan and give me a result like in time or delay?

I hope ist understandable what I try to do.

Thank you in advance for your help Regards

Heiko

3 Replies
sunny_talwar

Try this:

If(Len(Trim([Cut Out 1st])) = 0, Today(), [Cut Out 1st]) - [Cut Out Plan]

To calculate the difference. And may be this to find late or not late

If((If(Len(Trim([Cut Out 1st])) = 0, Today(), [Cut Out 1st]) - [Cut Out Plan]) > 0, 'Late', 'In Time')

maxgro
MVP
MVP

if you have null in [Cut Out 1 st] you can also use the alt function

if( [Cut Out Plan] >= alt([Cut Out 1st], Today()), 'In Time', 'Late')

Not applicable
Author

Hello,

thx for your help. I solved it at the moemnt with the isnull function. So I said

if (isnull(Cut Out 1st),
 
if (Cut Out Plan >= today(), 'in time', 'delay' )

Regards

Heiko