Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I have a question on mapping.
Lets say i have a mapping table for marketing team where they can create conditions for the campaign that they are doing. In this way all the orders in QlikSense will be tagged to a campaign if applicable to track marketing performance.
Concat | Booking_Week | Country | Product | Campaign_ID |
2018-01BrazilEggs | 2018-01 | Brazil | Eggs | 1 |
2018-02ArgentinaBread | 2018-02 | Argentina | Bread | 2 |
2018-02ArgentinaEggs | 2018-02 | Argentina | Eggs | 2 |
2018-03Malaysia | 2018-03 | Malaysia | 3 |
If u see the fourth record, it is a campaign for Malaysia where it applies to all product. Hence the composite Key (is Booking Week&Country&Product) will be blank for products in the case for Malaysia.
There are multiple permutations into it where there can be cases where country field are empty (which applicable all countries) and for certain product like bread.
Hence to list out all permutation in my QS code is not possible due to the complexity.
In my table , i added this code .
applymap('Test',Booking_Week & Country & Product ,false()) to get the campaign ID. How can i ask QS to smartly interpret those blank value and take in all the values? meaning for the case (Malaysia), it will take all products for Country = Malaysia.
May be create multiple Mapping tables with map based on different Concat
MappingTable1: Mapping LOAD Booking_Week&Country&Product, Campaign_ID FROM ...; MappingTable2: Mapping LOAD Booking_Week&Country, Campaign_ID FROM ...;
and then when you are using it you can do something like this
ApplyMap('MappingTable1', ....., ApplyMap('MappingTable2', ....., Null())) as ....
So, basically try to map based on MappingTable1... but for Malaysia it won't work.. and will go into the second ApplyMap based on MappingTable2.
May be create multiple Mapping tables with map based on different Concat
MappingTable1: Mapping LOAD Booking_Week&Country&Product, Campaign_ID FROM ...; MappingTable2: Mapping LOAD Booking_Week&Country, Campaign_ID FROM ...;
and then when you are using it you can do something like this
ApplyMap('MappingTable1', ....., ApplyMap('MappingTable2', ....., Null())) as ....
So, basically try to map based on MappingTable1... but for Malaysia it won't work.. and will go into the second ApplyMap based on MappingTable2.