Skip to main content
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
1 Solution

Accepted Solutions
sunny_talwar

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

Try this:

vChoice:

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

[Veges] ={"Cucumber"},

[Fruits] = {"Bananas"}

)


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


talk is cheap, supply exceeds demand
sunny_talwar

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