Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

How to Change NULL in the current date?

Hello,

I'm using an oracle database (Im using Qlikview personal edition). Im loading columns filled with a date, what i want is to load the current date where the cel is NULL.

Here is a part of the database:

DATE1DATE2DATEE3
17-12-2012 0:0020-12-2012 0:0020-12-2012 0:00
19-12-2012 0:0019-12-2012 0:0019-12-2012 0:00
20-12-2012 0:0031-12-4000 0:00
24-12-2012 0:0031-12-4000 0:00
27-12-2012 0:0031-12-4000 0:00
27-12-2012 0:0030-12-2012 0:0030-12-2012 0:00
27-12-2012 0:0031-12-4000 0:00
31-12-2012 0:0031-12-4000 0:00

Im using a chart with the following expression SUM(DATE3 - DATE1 +1). Does somebody now how i can load the NULL's as the current date, so that it will load today as 03-01-2013 and tomorrow as 04-12-2013 (when i refresh my script) etc.?

4 Replies
mayilvahanan
Not applicable

Re: How to Change NULL in the current date?

Hi

Try like this

Load *,if(len(trim(Datefield))=0,Today(),DateField) as Datefieldname;

Select * from tablename;

Not applicable

Re: How to Change NULL in the current date?

Thanks for your quick response but my expression, which was SUM(DATE3 - DATE1 +1) and now must be SUM(Datefieldname - DATE1 +1) won't work anymore. The connection (if that's the right way to call it) between the colums is lost then.

EDIT: Hmm, it appears i did something wrong, let me try it again.

khadeer_sparks
Not applicable

Re: How to Change NULL in the current date?

In Backend try this one,

if(DATE3=null(),date(Today()),DATE3) as DATE3

Hope it will helps u.

Not applicable

Re: How to Change NULL in the current date?

Try This,

if(IsNull(Date3)or Date3 ='',Date(Today()),Date3) as date3

Hope it helps