Wanting to create a new If Else statement that categorizes by two conditions from different columns. The first one is IsAdult and some of the values have 'adult' in them which is why I used contains; same goes for 'clipped' under the ISCLIPPED column.
I know this may be a syntax error.
if (ISADULT contains 'adult') and (ISCLIPPED contains 'clipped')
then ('Adult Clipped')
else if (ISADULT contains 'adult') and (ISCLIPPED contains 'Not Clipped')
then ('Adult Not clipped')
else ('NA')
if ((ISADULT contains 'adult') and (ISCLIPPED contains 'clipped'))
then ('Adult Clipped')
else (
if ((ISADULT contains 'adult') and (ISCLIPPED contains 'Not Clipped'))
then ('Adult Not clipped')
else ('NA')
)
But that logic won't work because 'Not Clipped' contains 'Clipped' so that would also produce 'Adult Clipped'.
How about this?
if ((ISADULT contains 'adult') and (ISCLIPPED contains 'Not Clipped'))
then ('Adult Not clipped')
else (
if ((ISADULT contains 'adult') and (ISCLIPPED contains 'clipped'))
then ('Adult Clipped')
else ('NA')
)
And since you're using IF-THEN-ELSE rather than CASE-WHEN-THEN-END, there may be a concern about case-sensitivity -- depending on how Cognos decides to process it.