Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm trying to filter out certain results from my report and replace a column value with a message. I'm new to Qlik and not sure that this is legal in the expression editor as I keep getting the error " expected ')' ". Any help will be appreciated! Code Follows:
if([Casing Status] != ('RELEASED')
OR [Casing Status] != ('SHOP_FLOOR')
OR [Casing Status] != ('DELETED')
OR [Casing Status] != ('Casing Completion')
OR [Casing Status] != ('Complete')
OR [Casing Status] != ('Posted'), 'Casing not in process', )
May be try this
If(NOT Match([Casing Status], 'RELEASED', 'SHOP_FLOOR', 'DELETED', 'Casing Completion', 'Complete', 'Posted'), 'Casing not in process')
Or may change the symbol simply
if([Casing Status] <> ('RELEASED')
OR [Casing Status] <> ('SHOP_FLOOR')
OR [Casing Status] <> ('DELETED')
OR [Casing Status] <> ('Casing Completion')
OR [Casing Status] <> ('Complete')
OR [Casing Status] <> ('Posted'), 'Casing not in process', )
Thank you Sunny! That does work great. But why didn't my nesting OR's work? Is that not allowed in the Expression Syntax?
Few issues with it...
1) Not equal in Qlik is <>, not !=
if([Casing Status] != ('RELEASED')
2) Not sure why you use parenthesis around the search string
if([Casing Status] != ('RELEASED')
The parens were a last ditch experiment to see what happens. I have not been able to find any concise document concerning Expression Syntax yet, so I try different things based on my experiences with other programming languages. I appreciate your help, I'm slowly learning what I can and can't do in Qlik.
Sunny is right you dont need brackets parenthesis because it is string values and it get manipulate or checked by the if condition.
You can use it both on load script or as well as on calculated dimension
=if([Casing Status] <> 'RELEASED'
OR [Casing Status] <> 'SHOP_FLOOR'
OR [Casing Status] <> 'DELETED'
OR [Casing Status] <> 'Casing Completion'
OR [Casing Status] <> 'Complete'
OR [Casing Status] <> 'Posted', 'Casing not in process')
if([Casing Status] <> 'RELEASED'
OR [Casing Status] <> 'SHOP_FLOOR'
OR [Casing Status] <> 'DELETED'
OR [Casing Status] <> 'Casing Completion'
OR [Casing Status] <> 'Complete'
OR [Casing Status] <> 'Posted', 'Casing not in process') as FieldName
It is appreciated Raymond keep doing good things and learn new things in Qlik.
We are all learning my friend... I am sure you will learn the syntax in no time