Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Not applicable

Sum 2 different nationalities

Hello,

For my first message on this forum I would like to ask a question regarding calculation on nationalities.

My observations can have 2 different nationalities stored in two variables (Nat1 and Nat 2)

My question is how can I observe one nationality simultaneously on those 2 variables ?

Example

                    Nat1      Nat2

customer 1:      US     CA

customer 2:      CA     N/A

customer 3:     DE     US

With the list above I need to be able to count 2US , 2 CA and one DE

Is it also possible to only have one selection option in the filter ?

Thanks in advance

Tags (1)
1 Solution

Accepted Solutions
MVP
MVP

Re: Sum 2 different nationalities

Create a link table in this case

Table:

LOAD Customer,

          Nat1,

          Nat2

FROM ...;

LinkTable:

LOAD DISTINCT Customer,

     Nat1 as Nat,

     'Nat1' as Flag

Resident Table;

Concatenate (LinkTable)

LOAD DISTINCT Customer

     Nat2 as Nat,

     'Nat2' as Flag

Resident Table;

2 Replies
MVP
MVP

Re: Sum 2 different nationalities

Create a link table in this case

Table:

LOAD Customer,

          Nat1,

          Nat2

FROM ...;

LinkTable:

LOAD DISTINCT Customer,

     Nat1 as Nat,

     'Nat1' as Flag

Resident Table;

Concatenate (LinkTable)

LOAD DISTINCT Customer

     Nat2 as Nat,

     'Nat2' as Flag

Resident Table;

Not applicable

Re: Sum 2 different nationalities

Thanks a lot that's perfect