Qlik Community

QlikView Deployment

Discussion Board for collaboration related to QlikView Deployment.

Not applicable

Time field how to flag when value is null ?

Hi All I have a field which is Time steam , i like to flag those value with nul. may i Hi All I have a field which is Time steam , i like to flag those value with nul. may i know how to do it ? using the load script . Paulknow how to do it ? using the load script . Paul

1 Solution

Accepted Solutions
qlikpahadi07
Valued Contributor

Re: Time field how to flag when value is null ?

Hi,

Find the attachment you can reload and can find one more Field named as Flag

hope that works

if(Len([Clock In]) <1,'Null','Time in') as Flag,

5 Replies
Not applicable

Re: Time field how to flag when value is null ?

hi,

     try this in your load script:

load

[AC-No.],

     Name,

     Date,

     Timetable,

     If(IsNull([Clock In]) or [Clock In]='' , 0, [Clock In]) as  [Clock In],

     [Clock Out],

     Late

From

tablename

some time field may be empty also so it will not check with null condition so you have add condition for empty value also.

hope this helps you.

Regards,

Ashutosh

israrkhan
Valued Contributor II

Re: Time field how to flag when value is null ?

Try like below:

Table:

load

[AC-No.],

     Name,

     Date,

     Timetable,

     If(IsNull([Clock In]) or Len(Trim([Clock In])) = '' , 0, 1) as  TimeFlag,

     [Clock Out],

     Late

From ABC

now in front end you could write like,

sum({<TimeFlag =1>}Value), it will bring where time is not null or empty

sum({<TimeFlag =0>}Value) it will bring where time is null or empty.


Hope it helps..

vishalwaghole
Valued Contributor II

Re: Time field how to flag when value is null ?

Hi Paul,

Try this

if(isNull([Clock In]),'FLAG FOR NULL','FLAG FOR NOT NULL') as NULL_FLAG

Thanks and Regards,

Vishal Waghole

qlikpahadi07
Valued Contributor

Re: Time field how to flag when value is null ?

Hi,

Find the attachment you can reload and can find one more Field named as Flag

hope that works

if(Len([Clock In]) <1,'Null','Time in') as Flag,

Not applicable

Re: Time field how to flag when value is null ?

Hi All

Many Thank for help me with the script . Rohit script is the best because :-

1. it allow me to select null or not null.

2. it work.

Paul