Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi to everyone, I'm trying to achieve a solution for my problem..
I have a field (named for example event_list) that is structured with number separated by comma for example
133,212,43
12
155,166,123,145
....
In another table I have the corrisponding string value for each number:
Column a Column b
12 red
133 blue
212 yellow
43 black
155 grey
166 white
123 pink
145 violet
....
I want to replace the event_list field with this one
blue,yellow, black
red
grey,white,pink,violet
Can anyone help me?
Thank u in advance!!
Eva
Inline was just an example. You can load this from any source (database, excel, csv, qvd...)
MappingTable:
Mapping
LOAD ColA,
ColB
FROM Source....;
Fact:
LOAD *,
MapSubString('MappingTable', Field) as NewField;
LOAD Field
FROM Source...;
Use MapSubString Function here
Sample:
MappingTable:
Mapping
LOAD * INLINE [
ColA, ColB
12, Red
133, Blue
212, Yellow
43, Black
155, Grey
166, White
123, Pink
145, Violet
];
Fact:
LOAD *,
MapSubString('MappingTable', Field) as NewField;
LOAD * Inline [
Field
133,212,43
12
155,166,123,145
] (delimiter is |);
Hi Sunny T thank u for your answer but my problem is that I have more than 255.000 record each one with different value of the event_list field.. How can I avoid to write down the inline statement?
Inline was just an example. You can load this from any source (database, excel, csv, qvd...)
MappingTable:
Mapping
LOAD ColA,
ColB
FROM Source....;
Fact:
LOAD *,
MapSubString('MappingTable', Field) as NewField;
LOAD Field
FROM Source...;
Thank u so so so much!! It works!!!
Awesome!!! I would suggest you to close this thread by marking correct and helpful responses.
Qlik Community Tip: Marking Replies as Correct or Helpful
Best,
Sunny