Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
kakani87
Specialist
Specialist

Group data with in the dimension in script

I'm having country dimension with me

Country

spain

italy

france

germany

russia

i want to show in the filter all the countries and  EU5 to be added as grouping all countries

Expected O/P

Country

spain

italy

france

germany

russia

EU5

using match () able to get EU5 but not able to show all the individual countries

if(Match(Country,'Spain','Italy','France','Russia','Germany' ),'EU5',Country) as Country

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

In your example all countries fall into EU5, so you won't get the individual countries. If you want the individual countries as well as the grouping into one field concatenate load the country data once for the individual countries and once for the grouping. Load this as a seperate diemension table with an ID. Something like

Country:

Load *,RowNo() as ID;Load * Inline [Country

Spain

Italy

France

Germany

Russia

US

];

Concatenate LOAD ID,if(Match(Country,'Spain','Italy','France','Russia','Germany' ),'EU5') as Country Resident Country;

View solution in original post

4 Replies
MarioCenteno
Creator III
Creator III

May be try this

Pick(WildMatch([Country], '*Spain*', '*Italy*', '*France*','*Russia*', '*Germany*), 'EU5',Country) as [country]

stigchel
Partner - Master
Partner - Master

In your example all countries fall into EU5, so you won't get the individual countries. If you want the individual countries as well as the grouping into one field concatenate load the country data once for the individual countries and once for the grouping. Load this as a seperate diemension table with an ID. Something like

Country:

Load *,RowNo() as ID;Load * Inline [Country

Spain

Italy

France

Germany

Russia

US

];

Concatenate LOAD ID,if(Match(Country,'Spain','Italy','France','Russia','Germany' ),'EU5') as Country Resident Country;

vishsaggi
Champion III
Champion III

How is your EU5 linked to your other data? What should happen when you select EU5?

kakani87
Specialist
Specialist
Author

HI Nagaraju ..

Actually all the countries falls under EU5 group, so we want to show in the filter EU5 including all the countries.

now comes to the purpose of this is to select all the individuals in a filter is possible, like so we want to add another thing which is equal to all the countries filtered i.e EU5.