Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
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
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

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

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

6 Replies
Not applicable
Author

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
Author

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.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

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

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

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

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

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

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Hello Kaushik,

Thanks for your Answer