Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Re: If Statement

Hi you are correct it is not working properly i have took a screen shot The Delayed column uses the altered variable DELAYMINS and the delayed 2 column is using the expression given by Jagan.

Adfjacent to the highlighted cell it should display delayed and a non highlighted cell should display not delayed.

err.png

Highlighted
MVP
MVP

Re: If Statement

Hi,

Try adding SCH and CHKS as dimensions.  I think this solves the issue.

Regards,

jagan.

Not applicable

Re: If Statement

Hi thanks for your response i tried as per what you instructed but to no avail.

Not applicable

Re: If Statement

Hi Jagan,

I added both as dimensions but it did not alter the output. I have reattached the file i am working with.

NOTE: I am unable to load files I havent created as I am using the personal free edition.

Not applicable

Re: If Statement

Hi is anyone able to provide any further tips as to why this if statement is not functioning properly

flipside
Valued Contributor II

Re: If Statement

I may be misunderstanding your requirement but it looks to me that you need some sort of aggregation in your expression (sum, avg, max etc) otherwise you will return null and the comparison will fail hence only one value is returned.

I'm not sure why you are using the variable, but doesn't this work ...

=if(avg(CHKS-SCH)>0.010416666671517,'Delayed','Not Delayed')

I would probably use this instead though ...

=if(avg(CHKS-SCH)*24*60>15,'Delayed','Not Delayed')

flipside

Not applicable

Re: If Statement

tried the second formula and worked thanks so much flipside, and thank you as well to everyone that assisted.

Community Browser