Discussion Board for collaboration on QlikView Scripting.
we are trying to add sequence to below raw table using Master table. Sequence number is required
Table: ( Below table having details of each Leg Anode [i.e. Start] & Znode [i.e End] details )
MasterTable: ( This Master table having details of start & End details )
ID, StartNode, EndNode
we required data with sequence ID in below format
Can any one help, Thank's in advance.
You can get sequence number using sql
select ID,LegID, row_number() over(partition by ID order by LegID) from Table
load * inline [
AutoNumber(ID & '-' & LegID, ID) as Sequence,
order by ID, LegID;
DROP Table source;
Thanks for update...
LegId is not in sequence always .
Our logic is need to get the sequence number using ANode -> Z Node traversing.
From Master table select the ID,Start Node & Logic in source table is
1. Select row using ID ( Value#S1) & Anode ( Value#N1)
For above selection need to return Sequence as "1"
i.e. ID LegID Sequence
S1 MSB1 1
2. For Second sequence Legid , Business Logic: Znode of previous sequence will be Anode in current sequence. In Below Case MSB3 will come as Second Sequence.
S1 MSB3 2
S1 MSB5 3
S1 MSB2 4
Below is the example ,
And final out put will be
ID,LegID,Anode,Znode , Sequence