Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I don' understand how to build a SalesPerson Hierarchy, always go the same error, i think i don't understand what it should be, i tried the following:
SalesPerson:
LOAD SalesPerson.SalesPersonID,
SalesPerson.ParentEmployeeBusinessEntityID ,
SalesPerson.FullName,
%KEY_SalesPersonID AS SalesPersonID
RESIDENT TempSalesPerson;
DROP TABLE TempSalesPerson;
AdjacentNodes:
LOAD DISTINCT
SalesPerson.SalesPersonID AS NodeID,
SalesPerson.ParentEmployeeBusinessEntityID AS ParentID,
SalesPerson.FullName AS NodeName
RESIDENT SalesPerson;
DROP TABLE TempTerritory;
// create Expanded Nodes table
SalesPersonHierarchy:
Hierarchy (SalesPersonID, ParentID, NodeName, Parent, NodeName, Path, '-')
LOAD DISTINCT
SalesPerson.SalesPersonID AS SalesPersonID,
SalesPerson.ParentEmployeeBusinessEntityID AS ParentID,
SalesPerson.FullName AS NodeName
RESIDENT SalesPerson;
// create ancestors table
SalesPersonyHierarchyBelognsTo:
HierarchyBelongsTo (NodeID,ParentID,NodeName,CategoryTreeID, CategoryTree)
LOAD NodeID,
NodeName,
ParentID
Resident SalesPersonHierarchy;
ERROR:
HIERARCHY parameter NodeName (="NodeName") is not a valid field
SalesPersonHierarchy:
Hierarchy (SalesPersonID, ParentID, NodeName, Parent, NodeName, Path, '-')
LOAD DISTINCT
SalesPerson.SalesPersonID AS SalesPersonID,
SalesPerson.ParentEmployeeBusinessEntityID AS ParentID,
SalesPerson.FullName AS NodeName
RESIDENT SalesPerson
Hello,
Try placing the tab where you have the "hierarchy" of first.