Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
ananyaghosh
Creator III
Creator III

How to create hierarchies for the attached table

Hi,

I want to create hierarchies for the attached excel sheet tables. Please provide me steps how to do that in Qlikview? after creating hierarchies I want to show it in list box.

4 Replies
Joaquin_Lazaro
Partner - Specialist II
Partner - Specialist II

Hi ananyaghosh:

Read this explendid guide made by HIC Hierarchies

Hope this helps

Joaquín

awhitfield
Partner - Champion
Partner - Champion

Hi Sandip,

another useful link:

https://community.qlik.com/docs/DOC-5490

HTH Andy

Anonymous
Not applicable

ananyaghosh
Creator III
Creator III
Author

Hi,

I have used below script:-

LOAD CountryID,

    
CountryName

FROM

[\\Client\D$\304091\project\data\Dummy data\Country.xlsx]

(
ooxml, embedded labels, table is Sheet1);



Region:

LOAD RegionID,

    
RegionName,

    
CountryID

FROM

[\\Client\D$\304091\project\data\Dummy data\Region.xlsx]

(
ooxml, embedded labels, table is Sheet1);



State:

LOAD StateID,

    
StateName,

    
StateShortDesc,

    
RegionID

FROM

[\\Client\D$\304091\project\data\Dummy data\State.xlsx]

(
ooxml, embedded labels, table is Sheet1);



City:

LOAD [City ID],

    
[City Name],

    
[State ID] as StateID,

    
latitude,

    
longitude,

    
zip_code

FROM

[\\Client\D$\304091\project\data\Dummy data\CityDeatils.xls]

(
biff, embedded labels, table is [city-4$]);



ITEM:

LOAD Distinct [City Name] as VALUE, [City Name] & '-City' as NODE_ID, [StateID] & '-StateID' as PARENT_NODE_ID resident City;

LOAD Distinct StateName as VALUE, [StateName] & '-State' as NODE_ID, [RegionID] & '-RegionID' as PARENT_NODE_ID resident State;

LOAD Distinct RegionName as VALUE, [RegionName] & '-Region' as NODE_ID, [CountryID] & '-CountryID' as PARENT_NODE_ID resident Region;

LOAD Distinct CountryName as VALUE, CountryName & '-CountryName' as NODE_ID, [CountryID] & '-CountryID' as PARENT_NODE_ID resident Country;



HIERARCHY_TABLE:

Hierarchy(NODE_ID_H,PARENT_NODE_ID_H, ID, PARENT_NAME, NAME, NAME_FOR_TREE) load

NODE_ID,

NODE_ID as NODE_ID_H,

PARENT_NODE_ID as PARENT_NODE_ID_H,

VALUE as ID,

VALUE as NAME

resident ITEM;


And used NAME_FOR_TREE in list box and checked the box tree view. But it does not appear as tree view