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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Prevent multiple field selection when using calculated dimension

Hi

I have a calculated expression in a listbox similar to:

IF(Status <> 'Closed', ProjectName)

This restricts the listbox to be only populated by Projects which do not have a Status of 'Closed'.

However when a selection is made on one of the listed values in the listbox it makes selections in both Status and ProjectName (In above example it selects 'NOT Closed' Status as well as the specific ProjectName being selected).

Is there any way to work around this ?  I have experimented with ONLY, CONCAT, AGGR but having no luck.

Essentially what I need is similar to ONLY but must return ALL values matching the set criteria instead of only 1 value.

Anyone have any ideas ?

1 Solution

Accepted Solutions
rubenmarin

Hi Garyth, can you try this?:

Only({1<Status-={'Closed'}>} ProjectName)

or:

Aggr(Only({1<Status-={'Closed'}>} ProjectName), ProjectName)

View solution in original post

3 Replies
sunny_talwar

Try this may be:

=Aggr(Only({<Status -= {'Closed'}>}ProjectName), ProjectName)

rubenmarin

Hi Garyth, can you try this?:

Only({1<Status-={'Closed'}>} ProjectName)

or:

Aggr(Only({1<Status-={'Closed'}>} ProjectName), ProjectName)

Not applicable
Author

Thank you both.

I was experimenting with the same sort of technique but must have had the incorrect syntax.

Both the 1 and not specifying the 1 seem to work but I suspect the 1 may be more correct.  I will find out more as I build this into my app and will continue to post updates if I find anything else useful.

Edit:  On further investigation if using this in a listbox then excluding the '1' in the set expression causes all excluded values to be hidden (Very similar to ticking 'Hide Exclusions' in the listbox properties.