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

qlikview tree representation

Hello

which structure I must to use to represente in QLIKVIEW

dynamic tree ?

do not know in advance how many levels of the trees.

Should I use the load statement the hierachy load ?

If I use hierachy I have this error

HIERARCHY parameter NodeName  is not a valid field....

Could you help me?

Regards

Oronzo

4 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

Oronzo

Others would be better able to help you if you posted the complete load statement, or a qvw file containing the load in question

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

You have right. The Load  Statement is from mysql database

Maybe I don't understand how to use correctly the statement Hierarchy

Hierarchy(GDO_cli, GDO_sup, GDO_des ) Load

     GDO_cli as l_cdc,

     GDO_sup as l_sup,

     GDO_des as l_des

resident gdoret;

Regards

Oronzo

jonathandienst
Partner - Champion III
Partner - Champion III

Oronzo

Minimum paramaters for Hierarchy are

     Node ID

     Parent Node ID

     Node Name

Is this what you have?

You should get a table containing all the fields in you LOAD statement, plus the Node ID, Node Name, and a set of field named [Node Name1], [Node Name2], ... [Node NameN] which represent the succesive parents to the top of the tree (Node Name1).

For example:

tmpDimDealClass:

LOAD CD AS DealClass.ID,          // node ID

    NAME AS DealClass.Name,       // node name

    SUP_CD AS DealClass.Parent;   // parent node ID

SQL SELECT *

FROM OUTPUT.DIM_DEAL_CLASS;

DealClassRollup:

Hierarchy(DealClass.ID, DealClass.Parent, DealClass.Name)

LOAD Distinct * Resident tmpDimDealClass;

DROP Table tmpDimDealClass;

Produces:

DealClass.ID
DealClass.Name
DealClass.Name1
DealClass.Name2
DealClass.Name3
DealClass.Name4
DealClass.Name5
DealClass.Name6

DealClass.Parent

Hope that helps

Regards

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thank you

Jonathan your answer was very helpful

Regards

Oronzo