Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Parent -Child Hierarchy

Hi All,

I am having table like,

FunParaIdFunParaNameParentId
1fun1NULL
2fun2NULL
3fun3NULL
4fun4NULL
5fun5NULL
6fun6NULL
7fun7NULL
8fun8NULL
9fun91
10fun101
11fun1110
12fun1210
13fun131
14fun141
15fun151
16fun162
17fun172
18fun182

In funparaname column i am having function names,Parameter names,sub parameter names,again sub parameter names.....like this i am having >1000 rows.I want to give the parent-childs relations based on ParentId = FunparaId.here ParentId is null it is a function name.

Ex- if parentid is 1 then Funparaname comes under fun1.if parentid is 10 then Funparaname comes under fun10.like this i want to give parent-childs relations.

How to give the logic for this in qlikview.any one knows about this one.pls help me.

regards,

baru

1 Solution

Accepted Solutions

Re: Parent -Child Hierarchy

Hi,

    Use the hierarchy function. Have a look at the sample application attached.

Regards,

Kaushik Solanki

6 Replies
Not applicable

Parent -Child Hierarchy

Load the script below

Stephen

Data:LOAD * INLINE [
    F1, F2, F3
    1, Fun1
    2, Fun2
    3, Fun3, 1
    4, Fun4, 1
    5, Fun5, 5
    6, Fun6, 1
]
;

Child:

Load F1 as F1Child,

F2 as F2Child,

F3 as F1

resident Data;

Not applicable

Parent -Child Hierarchy

Hi Stephen,

Thanks for your reply,

here,i am fetching the data from database.And i am having >1000 rows,every day they updating the records in this table.

regards,

baru.

Re: Parent -Child Hierarchy

Hi,

    Use the hierarchy function. Have a look at the sample application attached.

Regards,

Kaushik Solanki

Not applicable

Parent -Child Hierarchy

Hello Kaushik,

Thanks for the hierarchy solution, but the two tables are not linked. Won't this lead to potential problems in more

sophisticated table structures that need linking?

Stephen

Parent -Child Hierarchy

Hi

   It depends on you which table to use. You can delete the first table and then link with your second table.

   You can also use the hierarchyBelongsto() function. Have a look at the help for more info.

Regards,

Kaushik Solanki

Not applicable

Parent -Child Hierarchy

Hello Kaushik,

Thanks for your Answer

Community Browser