Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

scw
New Contributor III

Custom grouping in QlikSense

Hi - how do I create a custom group dynamically in QlikSense? For e.g. I have 5 countries in my Geography hierarchy USA,Canada,Mexico,Argentina and Brazil. In my dashboard I only want to see North America(USA,Canada,Mexico) and South America(Argentina and Brazil). Any ideas?

1 Solution

Accepted Solutions
MVP
MVP

Re: Custom grouping in QlikSense

You could use a calculated dimension as a quick and dirty solution:

=If (Match(Country,'USA', 'Canada', 'Mexico'), 'North America',

     If(Match(Country, 'Argentina', 'Brazil'), 'South America))

But a better solution is to create a mapping table to load the group as a derived field in the load script.

4 Replies
jaaldurgam
Valued Contributor

Re: Custom grouping in QlikSense

Refer this doc.. this might helps!

grouping dimension values

Sreeni

MVP
MVP

Re: Custom grouping in QlikSense

You could use a calculated dimension as a quick and dirty solution:

=If (Match(Country,'USA', 'Canada', 'Mexico'), 'North America',

     If(Match(Country, 'Argentina', 'Brazil'), 'South America))

But a better solution is to create a mapping table to load the group as a derived field in the load script.

MVP
MVP

Re: Custom grouping in QlikSense

To create the mapping, use an inline load before loading the main fact table:

Map_Group:

Mapping LOAD * Inline

[

     Country, Group

     USA, North America

     Canada, North America

     Mexico, North America

     Argentina, South America

     Brasil, South America

];


Then when loading the fact table:


LOAD ....

     Country,

     ApplyMap('Map_Group', Country, 'Other') As CountryGroup,

     ...


Now use CountryGroup as the first dimension in your pivot and/or add a list box for CountryGroup to your dashboard.



scw
New Contributor III

Re: Custom grouping in QlikSense

Thank you for the answers above. Based on the suggestions above I created a test app and it's uploaded if you need to use it for a demo or as a starting point.

Community Browser