Discussion Board for collaboration on QlikView Scripting.
I have data structured as such:
I want to fill in the hierarchy - i.e.
- the TacticTask should always have a Subgroup and WorkStream
- the Subgroup should always have the related WorkStream
In the data there will be many WorkStreams - but the order of relationship is always determined by the index - i.e. 23 could be a new WorkStream with a similar hierarchy below.
The way I have been able to start to fill in in the following syntax:
This works one row at a time - and I am able to keep repeating it with new Field iterations below in the script- but the amount of Subgroups under a WorkStream is variable.
Is there a way to fill them all in at once, or run a loop so I only have to build the table one time.
You can do it in one pass using a preceding Load:
Load TaskIndex, WorkStreamTask, If(IsNull(SubgroupTask) and WorkStreamTask=Peek(WorkStreamTask),
Peek(SubgroupTask),SubgroupTask) as SubgroupTask, TacticTask ;
Load TaskIndex, If(IsNull(WorkStreamTask),
Peek(WorkStreamTask),WorkStreamTask) as WorkStreamTask,
You need one preceding Load per level you want to fill.