Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
alex59800
Contributor
Contributor

Customer Hierarchy issue script

Hi all,

Here is a challenge for scripts experts concerning Hierarchy issue. To be as clear as possible, i attach an excel with my question. Thanks a lot guys for your answer.

Alex

2 Replies
alex59800
Contributor
Contributor
Author

please ? anyone could help me ?

Thanks a lot

Not applicable

Use the above script and

HIER:

LOAD [HIERARCHY (Father)] as ParentID,

     [HIERARCHY (Son)] as NodeID,

     [HIERARCHY (Father)] as NodeName

FROM

Hier.xlsx

(ooxml, embedded labels, table is Sheet1);

HIERFINAL:

Hierarchy(NodeID, ParentID, NodeName)

Load

*

Resident HIER;

Concatenate('HIERFINAL')

LOAD

DISTINCT

NodeName1,

NodeName1 as NodeID

Resident HIERFINAL;

drop table HIER;

Create a table box with NodeName1, NodeName2, NodeName3, NodeID to see the output