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

Country Hierarchy as Treeview

Hi All,

I am trying to build a country hierarchy. Please help.

This is my data table where i have the country field.

SQL Select DEALER, COUNTRY,WAVE,...,....

From TABLE1 WHERE ENABLED='YES';

i created a below table and tried for country hierarchy

NODE_IDNAMEPARENT_ID
1ALL MARKETNULL
2GCC MARKET1
3Abu Dhabi2
4Bahrain2
5Dubai-SZR2
6Garhoud2
7Iraq2
8Jeddah2
9Jordan2
10Khobar2
11Kuwait - LR2
12Kuwait2
13Lebanon-JR2
14Lebanon-LR2
15Marrakech1
16Morocco1
17Oman2
18Qatar2
19Rabat1
20Casablanca1
21Riyadh2
22Sharjah2
23Tunisia1
24Algeria1
25Azerbaijan1
26Egypt1

Thanks.

15 Replies
tresesco
MVP
MVP

My mistake. Try:

Hierarchy (NODE_ID, PARENT_ID, COUNTRY, Parent, COUNTRY, PathName)

Then use PathName. Else re-upload your sample qvw.

Update: Corrected the field reference

Not applicable
Author

Hi Tresesco,

Thanks you for your time and support.

PathName is displaying empty.

I am uploading my QV file.

Appreciate you could help me to fix this issue.

Thanks.

tresesco
MVP
MVP

Note my update above.

Not applicable
Author

Thanks a lot Tresesco,

I have one last question. If i select directly "All Market" or "GCC" is not giving any result.

I have click the - symbol to get the result. It is there is any other way ? so that if i select  "All Market" it will display the result.

Thanks

tresesco
MVP
MVP

Yes, there is. You have to use HierarchyBelongsTo. Please refer the link I provided above for details.

Not applicable
Author

Thank you for your support