Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

If statement error

I have created scripting error where my statement is IF(EvType= 15 AND EvParam1 > Lookup('SystemResponseTime','%MailBoxID',EvMailBoxID,'MailBox'), 'Not met Service Level', 'Met Service Level' ) AS ServiceEventLevelStatus, well you can imagine the part not Met Service level is correct however, For met service level I only want it so that IF(EvType= 15 AND EvParam1

21 Replies
Not applicable
Author

I need it to be a field,  where the end user can choose if it has met or not, maybe a link key can work where I link
evtype, evparam1 and evparam2  ?

Greg_Williams
Employee
Employee

A list box can be created (from scratch)...and you can put in your own expression. Worth a try.

Not applicable
Author

What would my expression be?

Not applicable
Author

My apologizes I have never created a listbox embedded to an expression.

Greg_Williams
Employee
Employee

New Sheet Object > List Box... > Field > <Expression> > test logic to determine if this is working as expected > this will be able to provide choices that can be used to filter data elements.

Not applicable
Author

I have tried the expression but receiving nothing

=IF(EvType= 15 AND EvParam1 > SystemResponseTime, 'Not met Service Level') OR IF(EvType= 15 AND EvParam1 <= SystemResponseTime, '

Is my OR if statement negating everything?

Greg_Williams
Employee
Employee

Without having a look at the data, the thing that concerns me is EvParam1 > SystemResponseTime (because sometimes - dates are not sometimes straight-forward...might require date(<date>,'MM-DD-YYYY') in logic. ...something like that. Have you tested one logic piece at a time to see if it works alone? Then we can stack the logic.

Not applicable
Author

@evtype 15 the evparam1 is a number in seconds, and so is SystemResponseTime,  My apologies for not clarifying that

Not applicable
Author

I think it requires a nested if statement but I am not sure what to use

Greg_Williams
Employee
Employee

You can floor(<date>) to strip away the time > makes it easier to work with dates.