Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

datagrrl
Contributor III

Set Analysis Help - Ignoring Values

Hello-

This is a pretty basic set analysis question.

I have countries and zones. When someone selects a country in chart one, I want to see numbers for all countries in that zone on chart 2.

AllData.PNG

They will not have selected the zone in any other filter, so it isn't really a "Current Selection"

I accomplished the desired outcome by using a trigger on the country field (Zone=Zone), but I was wondering if there is a better way to do this:

Canada.PNG

My simple expression for chart 2:

Sum({$<Country= > }Measure)

This is a mock up of the data.

Any assistance is appreciated.

1 Solution

Accepted Solutions
Highlighted
atkinsow
Valued Contributor II

Re: Set Analysis Help - Ignoring Values

I'm not entirely sure what you're saying.......

But maybe create a variable of

vZone=max(Zone)

and your expression is

=if(getselectedcount(Country)=1,

      Sum({$<Zone={'$(vZone)'},Country=> }Measure),

          Sum({$<Country= > }Measure))

3 Replies
Highlighted
atkinsow
Valued Contributor II

Re: Set Analysis Help - Ignoring Values

I'm not entirely sure what you're saying.......

But maybe create a variable of

vZone=max(Zone)

and your expression is

=if(getselectedcount(Country)=1,

      Sum({$<Zone={'$(vZone)'},Country=> }Measure),

          Sum({$<Country= > }Measure))

datagrrl
Contributor III

Re: Set Analysis Help - Ignoring Values

You must have understood what I was asking for, because it worked. I haven't been doing a ton of development lately, so this wasn't simple for me and I was having an issue figuring out what terms to search for.

Thanks for your help.

atkinsow
Valued Contributor II

Re: Set Analysis Help - Ignoring Values

Glad it worked.  Can you mark my response as the answer then?

Qlik Community Tip: Marking Replies as Correct or Helpful