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: 
Anonymous
Not applicable

Set analysis with multiple selections and exclude

Hello,

I'm trying to figure out how to include multiple selections for a dimension within set analysis while that said dimension is also being set to select excluded values.

For example, I have 2 metric fields from different tables, one is used a first metric, the other is used to view correlations.

The 2 tables or the same, as are the fields, because one is a resident of the other.

My set analysis looks like this:

Count(DISTINCT{<Account = p({$<Flag = {1}>}Account), Correlation = e(Metric)>} Account)

/ count(DISTINCT total {<Account = p({$<Flag = {1}>} Account)>} Account)

This gives me values for a list of metrics where account exist in the selected Metric, but also exist for other Metrics/Correlation dimension values.

What I'm trying to do is something like this whenever I then select a Correlation field value:

Count(DISTINCT{<Account = p({$<Flag = {1}>}Account), Correlation = {e(Metric),Correlation} >} Account)

/ count(DISTINCT total {<Account = p({$<Flag = {1}>} Account)>} Account)


This way when I select a Correlation value, the other correlation values from the chart no longer appear and the chart shrinks down to just the single line with the correlation dimension value and the % value of the correlation remain unchanged with the selection

Correlation DimensionTotal FlagsFlags per Correlation%Correlation

Metric2

10000950095%
Metric310000800080%
Metric5100002002%

The result if I then click on Metric2 above:

Correlation DimensionTotal FlagsFlags per Correlation%Correlation

Metric2

10000950095%

Any help is greatly appreciated.

1 Solution

Accepted Solutions
sunny_talwar

How about this?

Count(DISTINCT{<Account = p({$<Flag = {1}>}Account), Correlation *= e(Metric)>} Account)

/ count(DISTINCT total {<Account = p({$<Flag = {1}>} Account)>} Account)

View solution in original post

3 Replies
sunny_talwar

How about this?

Count(DISTINCT{<Account = p({$<Flag = {1}>}Account), Correlation *= e(Metric)>} Account)

/ count(DISTINCT total {<Account = p({$<Flag = {1}>} Account)>} Account)

Anonymous
Not applicable
Author

That works! Thank you once again Sunny!  Can you explain the '*=' to me?  I haven't seen that before

sunny_talwar

Asterisk is there to create a intersection between your modifier and current selection. So if nothing is selected in Correlation, your modifier will decide what needs to be shown. But if within the options that the modifier has provided you select one, the intersection will kick in and will show only the one you have selected.