Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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.
amiumi66
New Contributor III

if statement

I want to write if statement with time. (hh:mm)

I have a field dimension like below:

Time

00:25

02:44

18:25

00:00

In a pivot or straight table i just want show Time field if it is more then 00:00 otherwise make it null. Please show how.

9 Replies
Ralf_Heukäufer
Contributor III

Re: if statement

if(Time='00:00',null(),Time)

Re: if statement

Null means you are going to kill those?

If(Time = Time(MakeTime('00:00'), 'hh:mm'), 'Null', Time)

OR

If(Time = Time(MakeTime('00:00'), 'hh:mm'), ' ', Time)

Life is so rich, and we need to respect to the life !!!
amiumi66
New Contributor III

Re: if statement

getting results in -decimals.

amiumi66
New Contributor III

Re: if statement

null means just keep the field empty. don't show anything.

Ralf_Heukäufer
Contributor III

Re: if statement

if(Time='00:00',null(),Time(Time,'hh:mm'))

amiumi66
New Contributor III

Re: if statement

I am getting results in decimal format.

Re: if statement

Would you mind, Can you please provide sample?

Life is so rich, and we need to respect to the life !!!
amiumi66
New Contributor III

Re: if statement

1:00 is showing up as 4239.0416666667

Re: if statement

May be this?

If(Time = Time(MakeTime('00:00'), 'hh:mm'), ' ', Interval(Time/24/60/60, 'hh:mm'))

Life is so rich, and we need to respect to the life !!!
Community Browser