Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have created One hierarchy.. when i came to see in the listbox it is not showing any values in the listbox.. and it is showing hierarchy.
what might be the issue?
can anyone explain? Attached image for reference.
Best
Chanty
Hi,
I guess you missed the PathSource parameter in your example resulting in a path string consisting of delimiter characters only. So one solution might be:
Data:
Hierarchy(Account, Parent, AccountName, GroupName, AccountName, LedgerPath, '|', PathDepth)
LOAD Account,
Parent,
Account as AccountName
Inline [
Account, Parent
Acc1, Acc1
Acc2, Acc1
Acc3, Acc1
Acc4, Acc2
Acc5, Acc2
Acc6, Acc3
Acc7, Acc4
Acc8, Acc4
Acc9, Acc6
];
hope this helps
regards
Marco
Hi Chanty,
What code you had written? if you share ur code then only we will understand .else FYI..below links will help to you.
thanks sai,
Below script i have used.
Data:
Chanty Bro,
Can we know full script, What are these from your script GroupName, LedgerPath,PathDepth
OR
Try with My script and let us know if this helps with you
ORG_TABLE:
LOAD * INLINE [
RegionName, StateName, CityName
South, Andhra, Andhra
South, Prakasam, Ongole
South, Pondicherry, Pondicherry
South, Tamil Nadu, Chennai
South, Tamil Nadu, OMR
North, New Delhi, Surat
WEST, Maharashtra, Kalyan Nagar
WEST, Maharashtra, Pune
];
ITEM:
LOAD Distinct CityName as VALUE, CityName & '-City' as NODE_ID, StateName & '-State' as PARENT_NODE_ID resident ORG_TABLE;
LOAD Distinct StateName as VALUE,StateName & '-State' as NODE_ID, RegionName & '-Region' as PARENT_NODE_ID resident ORG_TABLE;
LOAD Distinct RegionName as VALUE,RegionName & '-Region' as NODE_ID, RegionName & '-Region' as PARENT_NODE_ID resident ORG_TABLE;
HIERARCHY_TABLE:
Hierarchy(NODE_ID_H,PARENT_NODE_ID_H, ID, PARENT_NAME, NAME, NAME_FOR_TREE) load
NODE_ID,
NODE_ID as NODE_ID_H,
PARENT_NODE_ID as PARENT_NODE_ID_H,
VALUE as ID,
VALUE as NAME
resident ITEM;
Output seems this, Try from your end like below and let us know your script so that we may can help with you
Hi,
I guess you missed the PathSource parameter in your example resulting in a path string consisting of delimiter characters only. So one solution might be:
Data:
Hierarchy(Account, Parent, AccountName, GroupName, AccountName, LedgerPath, '|', PathDepth)
LOAD Account,
Parent,
Account as AccountName
Inline [
Account, Parent
Acc1, Acc1
Acc2, Acc1
Acc3, Acc1
Acc4, Acc2
Acc5, Acc2
Acc6, Acc3
Acc7, Acc4
Acc8, Acc4
Acc9, Acc6
];
hope this helps
regards
Marco
Glad you liked some answers.
Please also close your thread if your question is answered:
Qlik Community Tip: Marking Replies as Correct or Helpful
thanks
regards
Marco
Nice Macro it worked like as a champ