Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i would need your help on this topic:
I am getting following Data under Qlikview:
I would like to assign the field-information from "AREA-EAN" when the Datatyp='AREA' as own column for the following eans, and then remove the line related to the datatyp "AREA" .
It should look like this:
I set different variables in order to use it in my first loop but the for...next doens´t work.
Has somebody any idea how I could get the desired result?
Hello, this script gets the result table:
OrigData:
LOAD * INLINE [
ID, Datatyp, AREA_EAN, Qty
1, AREA, A-30-D-00, 1
2, EANS, 4062171924956, 2
3, EANS, 4062171874947, 2
4, EANS, 4062171912946, 1
5, EANS, 4062171924956, 1
6, EANS, 4062171924956, 1
7, AREA, A-29-D-00, 1
8, EANS, 4062171874930, 1
9, EANS, 4062171912946, 1
10, EANS, 4066952504313, 1
11, EANS, 4066952504320, 1
12, EANS, 4066952504320, 1
13, EANS, 4066952504320, 1
];
ProcessData:
NoConcatenate LOAD
ID,
Datatyp,
If(Datatyp='EANS', Peek(AREA_EAN), AREA_EAN) as AREA_EAN,
Qty
Resident OrigData;
DROP Table OrigData;
FinalData:
NoConcatenate LOAD * Resident ProcessData where Datatyp='EANS';
DROP Table ProcessData;
Hello, this script gets the result table:
OrigData:
LOAD * INLINE [
ID, Datatyp, AREA_EAN, Qty
1, AREA, A-30-D-00, 1
2, EANS, 4062171924956, 2
3, EANS, 4062171874947, 2
4, EANS, 4062171912946, 1
5, EANS, 4062171924956, 1
6, EANS, 4062171924956, 1
7, AREA, A-29-D-00, 1
8, EANS, 4062171874930, 1
9, EANS, 4062171912946, 1
10, EANS, 4066952504313, 1
11, EANS, 4066952504320, 1
12, EANS, 4066952504320, 1
13, EANS, 4066952504320, 1
];
ProcessData:
NoConcatenate LOAD
ID,
Datatyp,
If(Datatyp='EANS', Peek(AREA_EAN), AREA_EAN) as AREA_EAN,
Qty
Resident OrigData;
DROP Table OrigData;
FinalData:
NoConcatenate LOAD * Resident ProcessData where Datatyp='EANS';
DROP Table ProcessData;
exactly what I wanted and so an easy way to solve the problem, thanks Rubenmarin