Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
ZuzJsk007
Contributor III
Contributor III

multiple selections in GetFieldSelections + Set Analysis

Hi, I'm using following expression to show only such ProductNames for which the CategoryName has been selected within filter pane "CategoryName":

=aggr(only({<CategoryName={'$(=GetFieldSelections(CategoryName))'}>} ProductName), ProductName)

But it doesn't work when I select more then 1 CategoryName. (no Product appear in the filter pane)

Is there any way how to do it?

I really appreciate any help. 🙂

Labels (2)
1 Solution

Accepted Solutions
GaryGiles
Specialist
Specialist

I misplaced a ")".  Try this:

=aggr(only({<CategoryName={$(=if(GetSelectedCount(CategoryName) > 0,concat({$} chr(39)&CategoryName&chr(39),',')))}>} ProductName), ProductName)

View solution in original post

4 Replies
GaryGiles
Specialist
Specialist

Try this:

=aggr(only({<CategoryName={$(=if(GetSelectedCount(CategoryName) > 0,concat({$} chr(39)&CategoryName&chr(39)),','))}>} ProductName), ProductName)

ZuzJsk007
Contributor III
Contributor III
Author

Unfortunately it doesn't work - it only works for one Category selection, not more

GaryGiles
Specialist
Specialist

I misplaced a ")".  Try this:

=aggr(only({<CategoryName={$(=if(GetSelectedCount(CategoryName) > 0,concat({$} chr(39)&CategoryName&chr(39),',')))}>} ProductName), ProductName)

ZuzJsk007
Contributor III
Contributor III
Author

Perfect! Thank you so much!:)