Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Morning,
I need to create my own sub group within my dataset.
I have a field called customer_code – I want to create a sub group to group them into depending on the customer type.
i.e.
customer_code 100200 = sub_group banking
customer_code 101230 = sub_group banking
customer_code 600300 = sub_group hotel
customer_code 600500 = sub_group hotel
customer_code 123456 = sub_group food & beverage
customer_code 321654 = sub_group food & beverage
this way I can report on the total number of customers by group (banking would contain 2 customers etc)
I thought of using apply map but cant get that to work.
Any ideas?
Create an inline table (or load from an external source) as a mapping load:
Map_bankgroup:
Mapping load * inline [
CC, Grp
1000200, Banking
101230, Banking
etc...
];
Then in load of main table use
Applymap('Map_bankgroup', customer_code) as Sub_Group,
What in customer_code column help you determine which sub-group they belong to?
Create an inline table (or load from an external source) as a mapping load:
Map_bankgroup:
Mapping load * inline [
CC, Grp
1000200, Banking
101230, Banking
etc...
];
Then in load of main table use
Applymap('Map_bankgroup', customer_code) as Sub_Group,
MAP:
MAPPING LOAD * INLINE [
F1,F2
100200 ,banking
101230, banking
600300 , hotel
600500 ,hotel
123456 , food & beverage
321654 ,food & beverage
];
Table:
LOAD
Applymap('MAP', customer_code,'no map') as sub_group,
customer_code,
...
Thanks everyone - issue resolved!