Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need to rename multiple values from the screenshot, we can use if condition for limited conditions like below, and can someone help how we could do this for multiple cases.
If(Type='A2' and Subtype='DDD002' and Category='Brand' and Code='clk_standard-2584-y21', 'A-High', Type AS [Type New]
If(Type='A2' and Subtype='DDD002' and Category='Brand' and Code='clk_standard-2584-y21', 'A5b: Demand', Subtype AS [Subtype New]
You can create a key with the concatenation of key field then use ApplyMap() function to get [Type New], then use the preceding load re-use your mapping table to get [SubType New] based on [Type New] values, so:
Map1: Mapping Load Key, Value Inline [ Key, Value A2|DDD002|Brand|clk_standard-2584-y21,A-High A-High,A5b: Demand ]; BookKK: Load *, ApplyMap('Map1',[Type New],Null()) as [Subtype New]; Load ... ... ApplyMap('Map1',Type&'|'&Subtype&'|'&Category&'|'&Code,Null()) as [Type New] From ...;
You can create a key with the concatenation of key field then use ApplyMap() function to get [Type New], then use the preceding load re-use your mapping table to get [SubType New] based on [Type New] values, so:
Map1: Mapping Load Key, Value Inline [ Key, Value A2|DDD002|Brand|clk_standard-2584-y21,A-High A-High,A5b: Demand ]; BookKK: Load *, ApplyMap('Map1',[Type New],Null()) as [Subtype New]; Load ... ... ApplyMap('Map1',Type&'|'&Subtype&'|'&Category&'|'&Code,Null()) as [Type New] From ...;