Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a "flag" dimension with 7 values (A, B, C, D, E, F, G). I want to group into 3 groups as A-C is "Group 1", D-F is "Group 2", G is "None".
Would the best way to do this be
=If(Match(Flag, 'A','B','C'), 'Group 1', if(match(Flag, 'D','E','F'), 'Group 2', 'if(match(Flag, 'G'), 'None')
or should I use pick match? If so, how would that formula be structured?
A coworker shared the if(match() statement that they've used in a previous dashboard they created, but their formula had the first if(match() statement as wildmatch. How do I know when to use that? They weren't sure why they used wildmatch vs just match.
Hi,
I don't know which is less work for the Qlik engine to calculate, but the Pick version would look like below;
=Pick(Match(flag,'A','B','C','D','E','F','G'),'Group 1','Group 1','Group 1','Group 2','Group 2','Group 2','None')
A few thoughts from folks who would know more than me here;
Pick Match vs Nested If Performance - Qlik Community - 1174461
Generally if you are using this a lot then that is a sign to get it added to the data model ...
Wild match just allows you to put wildcards (*, ?) in;
wildmatch - script and chart function ‒ QlikView
Cheers,
Chris.
Hi,
I don't know which is less work for the Qlik engine to calculate, but the Pick version would look like below;
=Pick(Match(flag,'A','B','C','D','E','F','G'),'Group 1','Group 1','Group 1','Group 2','Group 2','Group 2','None')
A few thoughts from folks who would know more than me here;
Pick Match vs Nested If Performance - Qlik Community - 1174461
Generally if you are using this a lot then that is a sign to get it added to the data model ...
Wild match just allows you to put wildcards (*, ?) in;
wildmatch - script and chart function ‒ QlikView
Cheers,
Chris.
Thank you! That worked, and helped my understanding of applicable use of the expression.