In most of my presentations I often showcase the logical relationships in a KPI framework. The way data can be analysed using these models is often a good thing to consider in your overall design of an analytics solution. This post is just about that. Visualizing the hierarchy that can exist in a dataset or KPI framework.

This particular example showcases a simple hierarchy of how a financial sales margin can be broken down into a logical hierarchy. If a similar hierarchy exists in a dataset you are working on, figure out how the relationships and calculations should be broken down into numerators and denominators. When done right, you could use this logic to work for your users to help simplify or guide analysis journeys.

The usecase

A hierarchy, or tree, with an example:

Gross margin hierarchy

In this hierarchy you can clearly see how the data for these individual measures is calculated and how fluctuation can influence the measures belonging to a branch.

So lets stop for a while. And think…


If a logic for a concept like ‘variance’ exists in a dataset, then this could really help us to design a better solution. And not only from a presentation perspective, also the flow of analysis could really benefit from a logic like this. To be able to boil down data to simple and logical visualizations, context and useful outcomes, … Yeah, I know. > Get started.

Yup, enough thinking…

Our Community

In our community there are a lot of resources that can help to visualize, solve and experiment with fun stuff. When I was scanning my backlog for a post I was looking forward to write today, an example from Qlik Branch crossed my mind. It was this extension developed by Renato Vieira which I came across, D3DynamicTreeLayout-QS. It suited the topic for explaining and visualizing the hierarchy of calculation perfectly.

What I did after that?

Apart from writing this post, I also created an app, with the concept explained a few lines ago. It takes the data from a dataset I also published earlier for some of the tutorials. And I’m going to include it here as well. Additional to this data I created a few new tables that handle the transformations to be able to work with the extension. This is the datamodel used by the app:


Tables 1 and 2 are the additions to the older datamodel. Just look into the apps’ script to understand what they contain together with the setup of the extension.

Next, an animated screenshot with some of the interactions:

Animated example


The example files

Last thing to do here is to share with you the examples to get you into the loop. Here you are:

  1. The dataset
  2. The application (QVF)
  3. The extension built by Renato Vieira


Happy discovery! See you a next time.