if you want to use applymap on more fields you can do it in this way:
field1 & '|' & field_2 as input
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 .