Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
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

Tags (1)
4 Replies
MVP
MVP

qlikview tree representation

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

Re: qlikview tree representation

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

MVP
MVP

Re: qlikview tree representation

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

Re: qlikview tree representation

Thank you

Jonathan your answer was very helpful

Regards

Oronzo

Community Browser