Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm trying to convert the below case statement into QlikView.
Can someone help me on the same?
case
when "ProductID1" in ('1','2','3','4')
or "ProductID2" in
('6','7','8','9')
then 'ProductGroup1'
else 'ProductGroup2'
end
Thanks
Satish
May be like this:
If(Match(ProductID1, 1, 2, 3, 4) or Match(ProductID2, 6, 7, 8, 9), 'ProductGroup1', 'ProductGroup2') as ProductGroup
May be like this:
If(Match(ProductID1, 1, 2, 3, 4) or Match(ProductID2, 6, 7, 8, 9), 'ProductGroup1', 'ProductGroup2') as ProductGroup
Sunny
Just a question out of curiosity, can't we use Pick in place of If?
Sunny
Just a question out of curiosity, can't we use Pick in place of If?
I don't think Pick will be easy, but here is another option
If(WildMatch(ProductID1&'|'&ProductID2, '1|*', '2|*', '3|*', '4|*', '*|6', '*|7', '*|8', '*|9'), 'ProductGroup1', 'ProductGroup2') as ProductGroup