Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

In load set today date if empty

Hi

I have a EndField that are empty if it´s still in progress. For those I want to mark with today date  today ()

Like this: In a other table the endfield are marked with with 99999999 for the post that are still active. There I use this fomula. 

 

Date(if(EndField2= 99999999, Today(), Date#(EndField2, 'YYYYMMDD')), 'YYYY-MM-DD') as EndField2,

How to do it if it´s empty?

If it´s to any help the table with the empty endfield all empty post are marked as 0 in i other field, named XXX34

1 Solution

Accepted Solutions
giakoum
Honored Contributor II

Re: In load set today date if empty

IsNull(expr )

Returns -1 (true) if expr returns NULL, otherwise 0 (false).

or

Date(if(XXX34= 0, Today(), Date#(EndField2, 'YYYYMMDD')), 'YYYY-MM-DD') as EndField2,

strange field names...

2 Replies
giakoum
Honored Contributor II

Re: In load set today date if empty

IsNull(expr )

Returns -1 (true) if expr returns NULL, otherwise 0 (false).

or

Date(if(XXX34= 0, Today(), Date#(EndField2, 'YYYYMMDD')), 'YYYY-MM-DD') as EndField2,

strange field names...

MVP
MVP

Re: In load set today date if empty

Or

if( len(trim(EndField2))=0, ....

works also with blank fields or fields that contain only (soft) spaces.

Community Browser