Discussion Board for collaboration on QlikView Scripting.
i have a Scripting Problem and am searching for help.
my data structure looks like that:
Column A, Column B, Column C
1, 0, 99
2, 1, 999
3, 4, 9
4, 6, 9999
5, 2, 99999
within the script I want to:
"search for value in of column A in column B and return the value of column C" as Value
The Table in my App should look like:
Column A, Value
Thanks for any help in advance!!
Go to Solution.
Chris, I'd do it by mapping. First, create map:
Mapping:MAPPING LOAD DISTINCT B, CFROM InitialData;
Next, use applymap:
Result:LOAD A, applymap('Mapping', A, null()) as CFROM InitialData;
Mapping Load B as A,C From xxx;
LOAD A, ApplyMap('MapTable', A, null()) as C From xxx;
Renaming B to A to have same column name, that's how mapping load works. ID column to match and the column to be retrieved
null() is the value to assign if there's no match
Mapping load doesn't really care about field names. The first field is searched and the second one is the result.
oh I see, thanks for the clarification, regards!
hey guys, that sounds as a good idea, i try it out and then i ll give Feedback, hope it works,
thank you in advance
Thanks to all. Solution works. Since i want to map more than one column in my original file, i do it with a join... works very well!!!
Ty all, again.