Qlik Community

QlikView Documents

Documents for QlikView related information.

Hierarchies

Employee
Employee

Hierarchies

Hierarchies are an important part of all business intelligence solutions, used to describe dimensions that naturally contain different levels of granularity. Some are simple and intuitive whereas others are complex and demand a lot of thinking to be modeled correctly.

  • What is the difference between a balanced and an unbalanced hierarchy?
  • How can a hierarchy be loaded into QlikView?
  • Which data model should be used?
  • How do I create an authorization scheme using a hierarchy?
  • How can I check for data integrity problems in the hierarchy data?

These questions and others are answered in this Technical Brief. Attached you will also find a sample unbalanced, n-level hierarchy along with the script to load it.

See also the following blog posts:

Unbalanced, n-level hierarchies

Authorization using a Hierarchy

HIC

2013-11-26: Added section on authorization.

Attachments
Comments
Not applicable

Henric, you're a wizard!

Not applicable

Thank you for the qlikview hierarchy compendium - especially the trick with the expanded nodes table to describe the trees!

Is there a possibility to show the first level of the drill-down group (Tree1...Tree7)?

In case of an hierarchy there is only one top level (ex. The World) and therefore the second level (Africa, Americas,...) is shown straight away in a dirll-down group used in charts. From point of user interaction it would be great to see every single level and drill down manually. There seems to be the possibility to add a NULL value (see Rob Wunderlich in http://community.qlik.com/message/333452#333452) but in case of a hierarchy this don't seem appropriate to me.

Employee
Employee

There are two ways you can do this:

  1. Define your group as a Cyclic group instead of a Drill-down group. Then you will need to drill down manually all the time.
  2. Use Rob's suggestion: e.g. add
       Concatenate Load null() as TreeID AutoGenerate 1;
    after the Expanded Trees' table.

HIC

MCampestrini
Valued Contributor

Henric, thank you form another great post. I've just needed this and now it's done.

carbal1952
Contributor II

Henric:

You're a step ahead.

Thanks.

CB.

adiarnon
Contributor III

Henric, thank you!!

I have a problem in my hierarchy-

i have my acount dimension-

ELEMENTPARENTWEIGHT
A1
BA-1
CA1
DC1
EC-1

MY FACT

ACOUNTVALUE
B3
C2
D5
E6

WHEN I NEED THE VALUE FOR C-(D AND E HIS SONS)


SUM(VALUE (E))* WEIGHT (OF THE CONNECTION BETWEEN E+C)+

SUM(VALUE (D))* WEIGHT (OF THE CONNECTION BETWEEN D+C)+

SUM(VALUE (C))

=

6*(-1)+

5*1 +

2


=1

THATS THE CALCULATION THAT I NEED

I DONt KNOW HOW TO MAKE IT WORK?!

HOPE ITS CLEAR

ADI

kara1322
New Contributor

I'm struggling with building an unbalanced hierarchy in qlik sense for my company's org structure.  I want to the user to be able to select from a job title, e.g., field:  VPA and user selects from names, which are also tied to fact table metrics, so when user selects that name, everyone under that VPA's numbers are included.  My main HR table has an individual and manager's name & alias and individual's job title. When i use the name as the hierachy foundation, then all the names need to fit in the name1, name2, etc. bucket, which they don't given the unbalanced hierarchy (e.g., vpa might be level 1 or level 2).  I thought to add a tree table but can't figure out what to use or how to build it out.  I'm unable to open your wine district app as an example to get a better sense of how the tree table works.  Thx for any guidance you can provide! Kara

kamalqlik
Valued Contributor

Nice Post Sir

Version history
Revision #:
1 of 1
Last update:
‎11-11-2013 09:07 AM
Updated by:
Employee