Skip to main content
Announcements
YOUR OPINION MATTERS! Please take the Qlik Experience survey you received via email. Survey ends June 14.
cancel
Showing results for 
Search instead for 
Did you mean: 
bobbydave
Creator III
Creator III

Grouping and outputting result

CountryDateEntityData
DEXATest
BEXBtest
UKXCtest
CEXBAnother Test
FRXAAnother Test
IEXAetc
PTXCetc
EEXAetc

I have the above table. With Country being my unique identifier throughout my app, I now have one part of the app that depends on the Entity and although Country wont be visible in this next table, it will do the workings dependent on Country

Table_EntityTable_IndexTable_Data
AAll the data on A
BAll the data on B
CAll the data on C

I want to gather Country dependent on Entity A, B and C and then the output should display the total Data in Table_Data.

Hope I've explained myself.

5 Replies
awhitfield
Partner - Champion
Partner - Champion

Create a straight table with Entity as the Dimension and Concat(Country,';')  as the expression

Andy

datanibbler
Champion
Champion

Hi bobbydave,

I get it you want to assemble all the Countries which are associated with any of the entities in your second table?

Try the CONCAT() function for that, like

>> Concat([country], ';') <<

=> You will get a field looking like >> Germany;Belgium;Uruguay << (if those countries are associated with your entity)

HTH

bobbydave
Creator III
Creator III
Author

Something similar to this.

Although you have the last part correct by that would be Concat(Data, ',')

I need to first gather the countries so that Entity A B and C each have so many countries.

I was thinking more set analysis but that only brings back a numeric value, right? Wont work for String?

A might bring back UK, Ireland, Belgium

B might bring back France, Denmark, Germnay

C might bring back Turkey, Sweden, Norway

and from there, it would pick up the relevant data from Column Data and Concat(Data, ',') into Table_Data Column.

so the logic would be

if(

     (if Entity ='A', Country

          else if Entity = 'B', Country

               else if Entity = 'C, Country),

concat(Data, ', '), '')

bobbydave
Creator III
Creator III
Author

Something similar to this.

Although you have the last part correct by that would be Concat(Data, ',')

I need to first gather the countries so that Entity A B and C each have so many countries.

I was thinking more set analysis but that only brings back a numeric value, right? Wont work for String?

A might bring back UK, Ireland, Belgium

B might bring back France, Denmark, Germnay

C might bring back Turkey, Sweden, Norway

and from there, it would pick up the relevant data from Column Data and Concat(Data, ',') into Table_Data Column.

so the logic would be

if(

     (if Entity ='A', Country

          else if Entity = 'B', Country

               else if Entity = 'C, Country),

concat(Data, ', '), '')

bobbydave
Creator III
Creator III
Author

Something similar to this.

Although you have the last part correct by that would be Concat(Data, ',')

I need to first gather the countries so that Entity A B and C each have so many countries.

I was thinking more set analysis but that only brings back a numeric value, right? Wont work for String?

A might bring back UK, Ireland, Belgium

B might bring back France, Denmark, Germnay

C might bring back Turkey, Sweden, Norway

and from there, it would pick up the relevant data from Column Data and Concat(Data, ',') into Table_Data Column.

so the logic would be

if(

     (if Entity ='A', Country

          else if Entity = 'B', Country

               else if Entity = 'C, Country),

concat(Data, ', '), '')