Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
gfisch13
Creator II
Creator II

Error in Expression

Hi All - the expression below is not functioning properly.   Each line is intended to populate a bar on a bar chart.   It loads from the script but does not populate the bars of a bar chart as it should.   I know there are probably better ways to calculate this but looking to understand other options.   We are also using the '*' as a wildcard function, but thinking this is not proper usage either.   Thanks!!


IF ([Case Type] = 'Employee', Dual('Employee', 1)),
IF ([Case Type] = 'Agent*' AND ([Net Loss (USD)]>10000), Dual('Agent>10k', 2),
IF ([Case Type] = 'Policy*' AND ([Net Loss (USD)]>10000), Dual('POS >10k', 3),
IF ([Case Type] = 'Procure*' AND ([Net Loss (USD)]>100000), Dual('Procurment >10k', 4),
IF ([Case Type] = 'Claim' AND ([Net Loss (USD)]>250000), Dual('Claims >250k', 5),
IF ([Case Type] = 'Under*' AND ([Net Loss (USD)]>250000), Dual('U/W >250k', 6))))))as SigCases,
 

1 Reply
stigchel
Partner - Master
Partner - Master

You close of the first if statement too soon, furthermore use wildmatch to compare with wildcards

IF ([Case Type] = 'Employee', Dual('Employee', 1)),
IF ([Case Type] = 'Agent*' AND ([Net Loss (USD)]>10000), Dual('Agent>10k', 2),
IF ([Case Type] = 'Policy*' AND ([Net Loss (USD)]>10000), Dual('POS >10k', 3),
IF ([Case Type] = 'Procure*' AND ([Net Loss (USD)]>100000), Dual('Procurment >10k', 4),
IF ([Case Type] = 'Claim' AND ([Net Loss (USD)]>250000), Dual('Claims >250k', 5),
IF ([Case Type] = 'Under*' AND ([Net Loss (USD)]>250000), Dual('U/W >250k', 6))))))asSigCases,


https://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/ConditionalFunctions/w...