Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Hiearchy treeview

Hello, i tried to make an hiearchy in my edit script, by reading some of the examples in here, but i cant seem to get it right.

So i hope someone can help me:

I have this Table:

QUALIFY*;

UNQUALIFY SalesPhasesKey;

DimSalesPhases:

LOAD SalesPhasesKey,

    FieldID,

    OptionText,

    OptionID,

    OptionID as ParentOptionID,

    Milestone,

    Phase;

SQL SELECT *

FROM Hej.dbo.DimSalesPhases;

UNQUALIFY*;

Hiearcgy:

Hierarchy(HiaerOp,HiearParent,HiearMilestone,',HiearPhase, TreeView)

Load OptionID as HiaerOp, OptionID as HiearParent, DimSalesPhases.OptionID as HiearParent,DimSalesPhases.Milestone as HiearMilestone,DimSalesPhases.Phase as HiearPhase

Resident DimSalesPhases;

My OptionID is my ID for OptionText - How ever i have substringed my OptionText into to- Milestone and Phase

Tags (1)
1 Solution

Accepted Solutions
er_mohit
Honored Contributor II

Re: Hiearchy treeview

go to this link

http://community.qlik.com/thread/60495

hope it helps

2 Replies
er_mohit
Honored Contributor II

Re: Hiearchy treeview

go to this link

http://community.qlik.com/thread/60495

hope it helps

Not applicable

Re: Hiearchy treeview

Thank you! I tried that link but could not get it to work.

But the document you posted helped me alot:

HierarchyTable:

Load distinct DimSalesPhases.Milestone as VALIE, DimSalesPhases.Milestone & '-Mile' as NODE_ID, DimSalesPhases.Phase & '-Phase' as PARENT_NODE_ID resident DimSalesPhases;

Load distinct DimSalesPhases.Phase as VALUE, DimSalesPhases.Phase & '-Phase' as NODE_ID, DimSalesPhases.Milestone & '-Mile' as PARENT_NODE_ID resident DimSalesPhases;

Hiearchy_Table:

Hierarchy(NODE_ID_H,PARENT_NODE_ID_H,ID,PARENT_NAME,NAME,Treeview) Load

NODE_ID,

NODE_ID as NODE_ID_H,

PARENT_NODE_ID as PARENT_NODE_ID_H,

VALUE as ID,

VALUE as NAME

Resident HierarchyTable;

This is what i finished with and then it worked - Thanks alot!

Community Browser