2 Replies Latest reply: Sep 21, 2018 10:29 AM by Shahbaz Khan Mohammed RSS

    Map from 2 colums

    Shahbaz Khan Mohammed



      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?



        • Re: Map from 2 colums
          Maria Sandorova

          Hi Shahbaz,


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



          mapping load

               field1 & '|' & field_2 as input


          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 .