Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis Problem, Data exclusion

Hello All,

I have a chart which has each expression based on column values, the same field values are used as filters also. No when i'm selectting the filters i want't all the other column values to be 0 and only show values for the excluded filters.

Filters:

CountryGroup
USA
EEA
USB
CAC

         

The Chart structure is

CountryGroup
ClientUSEEABC
aaa1010521
bbb87654
cccc32123

The expressions are as below for Groups

A= Sum({<Group= {A}>}Revenue)

B= Sum({<Group= {B}>}Revenue)

US = Sum({<Country= {US}>}Revenue)

My issue is that when i apply filter on Group A, i see values for Group B and C alos. I want to make these values to 0 and show values for Group A only.

Thanks

6 Replies
shree909
Partner - Specialist II
Partner - Specialist II

i think u need to enclose the  expression as

A= Sum({$<Group= {'A'}>} Revenue)

Not applicable
Author

Hello shree,

Thanks, i tried this but does'nt work.this is not hiding the values for group B.

Thanks

nirav_bhimani
Partner - Specialist
Partner - Specialist

HI

Using this it will show only those expression which are selected in filter.

try this.

Use This expression in Conditional

=SubStringCount(Concat(Group,'|'),'A')

And In Definition your normal expression like: Sum({<Group= {A}>}Revenue)

Similarly for other expressions as well.

Hope this will help you.

Regards,

Nirav Bhimani

Not applicable
Author

Hi,

Set analysis will not allow to selections, it will display standard value based on expression..

Use if condition instead of Setanalysis..

 

if

(group='A',sum(Revenue

))

here it will give '0' when you make selections..

Hope it helps...

//chandra

Not applicable
Author

Thanks all .

This is what used:

if(GetSelectedCount(Group)= 0,Sum({<Group={'A'}>}Revenue),

if(GetSelectedCount(Group)= 1 and GetFieldselections(Group) ='A',Sum({<Group={'A'}>}Revenue),0))

Thanks

fosuzuki
Partner - Specialist III
Partner - Specialist III

Hi,

I think that this will work and has better performance:

A= Sum({<Group*= {A}>}Revenue)

B= Sum({<Group*= {B}>}Revenue)

US = Sum({<Country*= {US}>}Revenue)

The idea is to use the *= operator in the set analysis.