Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Chart Of Account Sorting Logic

Hi Guys i was trying to creating logic for sorting chart of account,

Example :

Account Code :

10000

11000

12000

13000

COA:

10000..50000 -------> LV 1

  11000-20000 ------> LV 2

    11000..11999 -------> LV 3

    12000..12999

    13000..13999

    14000..14999

i was using IntervalMatch function to find each parent of each account, but i cant define the level of the hierarchy.

what should i do to define the hierarchy correctly ?

expected result :
10000 = belong to 10000-50000
11000=  belong to 11000-20000 and 10000-50000

12000 = belong to 11000-20000 and 10000-50000

13000= belong to 11000-20000 and 10000-50000

3 Replies
luciancotea
Specialist
Specialist

Digvijay_Singh

Try this -

Capture.JPG

Interval:

Load * inline [

Start, End

10000,50000

11000,20000

11000,11999

12000,12999

13000,13999

14000,14999 ];

Element:

Load * inline [

AccountCode

10000

11000

12000

13000 ];

Inner Join(Element)

IntervalMatch(AccountCode)

Load Start, End

Resident Interval;

Not applicable
Author

Hi Lucian and Digvijay

thanks for answering my question, both of you are helping me finding the answer.
but i decided to use Hierarchy function in qlikview to create the hierarchy

a function that look like this:

Hierarchy (NodeID, ParentID, NodeName, [ParentName], [PathSource], [PathName], [PathDelimiter], [Depth]) (loadstatement | selectstatement)

after you form the table with logic correctly, hierarchy function will be creating its level automatically.

Thanks and Regards,

Arviddree