Could someone help explain why this statement is a...
# suiteanalytics
c
Could someone help explain why this statement is acting odd and/or an easier way to write it?
Copy code
Case 
when {memo} LIKE '%x%' OR {memo} LIKE '%y%' {memo} LIKE '%z%' AND {postingperiod} = 'Jan 2019' then '1'
when {memo} LIKE '%x%' OR {memo} LIKE '%y%' {memo} LIKE '%z%' AND {postingperiod} != 'Jan 2019' then '2'
when {memo} NOT LIKE '%x%' OR {memo} NOT LIKE'%y%' {memo} NOT LIKE '%z%' AND {postingperiod} = 'Jan 2019' then '3'
when {memo} NOT LIKE'%x%' OR {memo} NOT LIKE'%y%' {memo} NOT LIKE'%z%' AND {postingperiod} != 'Jan 2019' then '4'
End
Based on what I tested it looks like it will respond with 1 - Returns XYZ, but wrong period 2 - Returns a subset of Z for some reason, but correctly ignores Jan 2019 3 - Removes XYZ, but wrong period 4 - Doesn't show