Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
juriengroot
Contributor III
Contributor III

Default value for pick match

Hi,

I am using a pick and match formula with a dimension (not a variable) and I'd like to show a default value if no value is picked.

$(=Pick(Match((Grouping1),'Option1',

'Option2')

,'[Option1]'

,'[Option2]'

))

I thought of something like:

if(Count(Grouping1)=1, $(=Pick(Match((Grouping1),'Option1',

'Option2')

,'[Option1]'

,'[Option2]'

)),Option1)

Anyone knows the right syntax for it?

11 Replies
marcus_sommer
MVP
MVP

For me it worked well - just tested (whereby in qlikview).

- Marcus

kl23
Contributor
Contributor

Just do

Pick( 1+Match( someField, baseVal1, baseVal2 ),  convertVal_default, convertVal1, convertVal2 )

Match returns 0 when no items matches. Plus 1 to shift it back, such that Pick get you the first item as default when no match is found.