Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis - Combining Identifiers?

Hi all - I'm trying to create an expression with set analysis that responds to users' selections in only one field, but the rest of the set modifiers respond to the entire dataset.  I know that I can use $ to respond to the users' selections and 1 to use the whole dataset, but if I have a set expression with more than one set modifier, how can I use $ on one set modifier and 1 on the other?

1 Solution

Accepted Solutions
antoniotiman
Master III
Master III

Sum({1<Field1=$::Field1,Field2=$::Field2>} Value)

View solution in original post

5 Replies
marcus_malinow
Partner - Specialist III
Partner - Specialist III

If for example you have fieldA where you want to respect the users' selections, and fieldB where you don't you can use the set

{$<fieldB=>}

This will ignore the users' selections in fieldB. You can add additional fields as required.

Not applicable
Author

So right now I have two fields that I'm concerned with; [Country] and [Contractor Location].  What I'm trying to do is build an equation to show the exports of the user's selected country - that is, when you select a country, show me by [Country] the sum of the TOTAL amounts in every other country where [Contractor Location] = [Country].

The values should always be the sum of the total amounts in every country excluding the country that the user selects, but that equation in itself will always change based on the user's country selection - i.e you select the US, it's the sum of all amounts everywhere but the US, you select Canada, it's the sum of all amounts everywhere but Canada.  I just want to exclude the user's country from the amount sum itself.

In my mind, this would look like 1[Country]-=$[Country] but I'm not sure how to put that in.

ramoncova06
Partner - Specialist III
Partner - Specialist III

you can use exclude and possible for that

sum({<Country e=(Country), [Contractor Location] =p (Country)>}Total )

antoniotiman
Master III
Master III

Sum({1<Field1=$::Field1,Field2=$::Field2>} Value)

Not applicable
Author

Used this to figure out my issues - thank you Antonio!