Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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

1 Solution

Accepted Solutions
sunny_talwar

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;

View solution in original post

2 Replies
sunny_talwar

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
Author

Thanks a lot that's perfect