Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Hierarchy

Hi,

Please suggest me to create hierarchy using flat table structure,

Ex;

Product Table 1:

Product_Class1_ID ProductClass1Name

1 Cold Remedies

2 Cold Remedies

3 Summer Remedies

Product Table 2:

ProductClass2_ID ProductClass2_name ProductClass1_ID

1 Anacin 1

2 Metacin 2

3 Paracitamol 3

I want o/p like

Cold Remedies

Anacin

Metacin

Summer Remdies

Paracitamol

i have used hierarchy and hierarchy function not able to acheieve correct o/p.

thks in advance

7 Replies
Not applicable
Author

Hello prabhu,

when I understood you right, you want to create dimensional levels on your productclasses. In this case you can link your classes together using the "ProductClass1_ID". Rename it to "Product_Class1_ID" (same as in table 1, take care of case sensitivity) and QV will link both tables together and you will have the desired productclasses hierarchy.

Regards, Roland

Not applicable
Author

Hi Roland,
Not applicable
Author

Hi Roland,

Thks for the reply.

I need to know the input table for this example,

Product Table 1:

Product_Class1_ID ProductClass1Name

1 Cold Remedies

2 Cold Remedies

3 Summer Remedies

Product Table 2:

ProductClass2_ID ProductClass2_name Product_Class1_ID

1 Anacin 1

2 Metacin 2

3 Paracitamol 3

how to use this example using qlikview hierarchy

thks in advance

Not applicable
Author

Hi,

See the attached qvw.

Reg,

Shubhasheesh

Not applicable
Author

Hi prabhu

Please find the attachment.

Hope its useful to you.

Thanks & Regards,

Sri

Not applicable
Author

Hello again,

I used the data from your first post.

Take a look at the script and at the table viewer. You do not need the hierarchy statement. QV links to tables automatically together with same fieldnames. With this in mind I linked your two tables and recieved the hierarchy you want. Or I am completly wrong? BTW: why do have Cold Remedies two different IDs ?

RR

Not applicable
Author

Can we display parent child relationship in Text boxes.

Actually i've a Country-->Region--->City kind of relationship in my structure & its needed to be in Text boxes as shown in the file attached.

Plz help

Thanks