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: 
adamjank
Contributor III
Contributor III

Pick(Match()) full string in the Set Analysis

Hello,

Before I prepare the whole file to show you what is the issue, I write it here:
I've prepare the variable like these:

vChoice:

pick(match($1, 'Veges','Fruits')

'[Veges] ={"Cucumber"}',

'[Fruits] = {"Bananas"}'

)

Then if I put the variable into the Set Analysis according to the official documents, only errors pops up:
=

=SUM({$ < $(vChoice("Veges")) >} [Spend]) it's no working and got this error 'Error: Error in set modifier expression'

Thanks in advance,
Adam

Certified QS BA / DA Developer
Looking for the QS workaround for missing object properties
Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

Try this:

=Sum({$<$(=$(vChoice('Veges')))>} Spend)

Where vChoice

Pick(Match($1, 'Veges', 'Fruits'),

'[Veges] = {"Cucumber"}',

'[Fruits] = {"Bananas"}')

View solution in original post

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Try this:

vChoice:

pick(match($1, 'Veges','Fruits')

[Veges] ={"Cucumber"},

[Fruits] = {"Bananas"}

)


=SUM({$ < $(=vChoice('Veges')) >} [Spend])


talk is cheap, supply exceeds demand
sunny_talwar
MVP
MVP

Try this:

=Sum({$<$(=$(vChoice('Veges')))>} Spend)

Where vChoice

Pick(Match($1, 'Veges', 'Fruits'),

'[Veges] = {"Cucumber"}',

'[Fruits] = {"Bananas"}')

adamjank
Contributor III
Contributor III
Author

Thank you a lot stalwar1!
Extra $(=...) solves the problem!

@gwassenaar‌It doesn't work.

Certified QS BA / DA Developer
Looking for the QS workaround for missing object properties