Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

if statement help

Need some help with the below if statements. All of it works with the exception of the first two if statements in the each section.

I've tried switching the orders around but it doesn't seem to work. All I want those parts to do is if [UserJobGroup.GroupDescription] equals 'OOO' and UserGroup equals 'PS' then make Metrics_Catagory say 'Production Support'. Otherwise, if UserGroup doesn't equal 'PS' then have it equal 'Non WR items/Other'.

Same goes for Metrics_SubCatagory.

Thanks for the help.

//Sorting buckets for main catagory pie chart

if(wildmatch([UserJobGroup.GroupDescription], '*OOO*'),
     if(wildmatch(UserGroup, '*PS*'), 'Production Support', 'Non WR items/Other'),
if(wildmatch([UserJobGroup.GroupDescription],'*Non WR*'),
     if(wildmatch([UserJobCategory.Category Description], '*OOO*'),'Non WR items/Other','Lights On'),
if(wildmatch([UserJobGroup.GroupDescription],'*Project*'),
     if(wildmatch([UserJobGroup.GroupDescription],'*Security*'),'Security','Customer Experience'),
if(wildmatch([UserJobGroup.GroupDescription],'*Foundational*'),'Foundational',
if(wildmatch([UserJobGroup.GroupDescription],'*Support*'),
     if(wildmatch([UserJobGroup.GroupDescription],'*Lights On*'),'Lights On','Customer Experience'),
[UserJobGroup.GroupDescription]))))) as Metrics_Catagory,

//Sorting buckets for sub catagory pie chart
if(wildmatch([UserJobGroup.GroupDescription], '*OOO*'),
     if(wildmatch(UserGroup, '*PS*'), 'Production Support', 'Non WR items/Other'),
if(wildmatch([UserJobGroup.GroupDescription],'*Security*'),'Security - Tasks/Projects',
if(wildmatch([UserJobGroup.GroupDescription],'*Project*'),
     if(wildmatch([UserJobGroup.GroupDescription],'*AQUIRE*'),'Strategic','Projects'),
if(wildmatch([UserJobGroup.GroupDescription],'*BusinessWR*','*Regulatory*','*Rate Changes*'),'Improve/Enhance',
[UserJobGroup.GroupDescription]))))as Metrics_SubCatagory

1 Reply
Not applicable

Re: if statement help

Can anyone help with this?

Community Browser