Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
s2ncpgwx
Contributor II
Contributor II

Set Analysis and Excluded Field Values

The attached simple example shows my attempt at using set analysis to show results for a specific field and value (value (Overall) for field [Attribute Name]). My set analysis expression is:

=sum({< [Attribute Name]={"?Overall?"} >} [Sync Count])

The desired result should look like the (Overall) chart visible in the Trellis when all selections are cleared. The set analysis does limit the results and the results are always correct. However the side-effects of selections in the [Attribute Name] listbox still cause problems. If any [Attribute Name] value other than (Overall) is selected, some of the [Sync Status] dimension values become excluded. The colouring and ordering of the dimension is disrupted.

Can anyone help with a set analysis expression that handles side effect exclusions on Sync Status, while allowing normal filtering based on selections in other fields?

2 Replies
tresesco
MVP
MVP

To keep color intact you could re-write expression for background color like:

=rgb(only({1}[Status Red]), only({1}[Status Green]), only({1}[Status Blue]))

[Sync Status] is associated to [Attribute Name] field, hence the side effect. To keep it unaffected, you could think of alternate state or creating a field in the script and keep it unassociated.

s2ncpgwx
Contributor II
Contributor II
Author

Thanks tresesco. Your background colour expression works perfectly and applying the same approach to the sort expression fixed that too. It took a little while to understand why this worked -- until I remembered that set analysis disregards selections but not dimensions.