Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Leverage your QlikView investment to modernize BI – see how! Join Group
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator III
Creator III

Trying to understand syntax

The syntax below:

takes the selection from the Industry list box and applies it to another list box, to reduce selections.

Can someone provide me with an explanation of how this statement works ...

=aggr(only({<Industry=>} Industry), Industry)

Tags (1)
2 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Trying to understand syntax

What this statement effectively does is show all currently associated values of Industry, while ignoring any selections made in Industry.

The {<Industry=>} set expression removes, or ignores, any current selections in Industry.

The only() function is required to be able to use the aforementioned set expression.

The aggr() function is way of applying the only() function to each Industry value in turn.


-Rob

Highlighted

Re: Trying to understand syntax

Hi,

when selecting in a calculated listbox using this expression, the listbox does not behave different from selecting in a listbox using this field directly.

When selecting in another field, this expression reduces the Industry values to only the possible values.

When using this expression without only() function and set expression, the listbox only shows possible or selected industry values, never excluded ones. This could be a solution when "hide excluded" is not enough (because it still leaves grey areas for the excluded values):

QlikCommunity_Thread_149613_Pic1.JPG

QlikCommunity_Thread_149613_Pic2.JPG

QlikCommunity_Thread_149613_Pic3.JPG

QlikCommunity_Thread_149613_Pic4.JPG

QlikCommunity_Thread_149613_Pic5.JPG

hope this helps

regards

Marco