Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
MK9885
Master II
Master II

Map from 2 colums

Hi,

I have a table with dates and country codes...

Date               Category       Type

6/12/2018          Age          18-24

6/12/2018         Age           55-64

7/22/2018         Age           55-64

7/22/2018          Age          18-24

6/12/2018          Gender     Male

7/22/2018          Gender     Female

6/12/2018          Age          25-34

6/12/2018         Age           65-74

7/22/2018         Age           25-34

7/22/2018          Age          65-74

6/12/2018          Gender     Female

7/22/2018          Gender     Male

I can derive 2 fields like age and Gender from this but I also want to map it

If I select Age 18-25 I should get gender as Male

The dates are repeating for gender/age

on 06/12 I have all the ages and all the genders

I tried cross table, didnt work

tried match condition did not work...

Apply maps takes only 1 field not sure if I can do subfield map etc?

stalwar1

youssefbelloum

2 Replies
JaMajka1
Partner Ambassador
Partner Ambassador

Hi Shahbaz,

if you want to use applymap on more fields you can do it in this way:

[M_your_map]:

mapping load

     field1 & '|' & field_2 as input

     result

resident whatever_your_want;

and then applymap('M_your_map',field1 & '|' & field2).

But actually I do not understand how the gender male should be derived in your example. If you select Age 18-24 then for example for date 6/12/2018 there is also row with both genders Male and Female. So how should it be derived? If the table in your post is not your input data, please post the input table .


BR,

Maria

MK9885
Master II
Master II
Author

It should be for both genders...

So if I select 16th date there is 1 male and 1 female.. same thing with age