Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
tinkerz1
Creator II
Creator II

How to let the user group data for charting

I have a simple chart that counts Distinct ID's, the end user has asked if they can create 2 groups, based on the countries.

This indicate of the total ID's which belong to them and which belong to others.

So I wrote in the expression:

 

count(distinct if(not wildmatch([Issue - Location],Constituents),[Issue - ID]))

 

count(distinct if( wildmatch([Issue - Location],Constituents),[Issue - ID]))

Then created a stacked bar chart.

But this only give me a choice of 1 country.

How can I make it interactive to make more than 1 group with each group containing more than one country?

Whats the best way, to have more alternates states if Group Constituents in a wildmatch formula?

-

I have added a qvw describing what I am after.

I want the user to selected all from grp 1, this would be the total, but then to select from grp 2 the countries to be split away from grp 1 and charted,

Thanks,

3 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

If you attach sample file then it would be easier to provide solution.  For this you can try

count({<[Issue - Location] =P(Constituents)>} distinct [Issue - ID]))


count({<[Issue - Location] =E(Constituents)>} distinct [Issue - ID]))

If you need more help on P() & E() refer qlikview help file in Set Analysis section.


Regards

Jagan.

tinkerz1
Creator II
Creator II
Author

Hi,

All I would like to do is exlude those countries selected in Grp 2 from Grp 1

 

=

count(distinct {[Grp 1]<Country=P([Grp 1]::Country),Country=P([Grp 2]::Country)>} distinct ID)

tinkerz1
Creator II
Creator II
Author

If i can nest a relace inside a set statement this may work.

I build a concat list from one list and exlude a country using the other selection and 'replace'

 

=

count(distinct {$<Country={"=Replace(Replace(GetFieldSelections(Country,',',100,'Grp 1'),GetFieldSelections(Country,',',100,'Grp 2'),''),',,',',')"}>} ID)