<img src="https://track.adform.net/Serving/TrackPoint/?pm=268420" width="1" height="1" alt="">
 
af Henrik Matz | 5. marts 2012
  

QlikView Charts with use of bar offset

The use of bar offset gives you the possibility easily to make new types of bar charts. Among them the powerful Gantt and Waterfall chart.

With Bar Offset you can create an expression for calculating an offset for the bar or bar segment associated with the data point.

Maybe this sounds difficult, but actually it’s quite easy. You find Bar Offset under properties of an expression in a bar chart:

Gantt chart:
Let’s say you have the following data and would like to create a Gantt chart:

  1. Create a bar chart with Task_Name as the only dimension.
  2. Create a measure to calculate the duration of each task name:
    “=max(Task_EndDate)-min(Task_StartDate)”
  3. In Bar offset of the measure you create a formula to calculate the start value each Task_Name: “=min(Task_StartDate)”
    And then you have your Gantt chart!

Waterfall Chart:
Let’s say you have the following data and would like to create a Waterfall chart:

  1. Create a bar chart with Account_Group as the only dimension.
  2. Create a measure to calculate the sum of each Account_Group:
    “ =sum(M_Measure)”
  3. In Bar offset of the measure you create a formula to calculate the start value each Account_Group:
    “If(rowno()=1,0,rangesum (above(sum(M_Measure),1,rowno()-1)))”

And then you have your Waterfall chart!

In this case the background color is calculated by the expression: “if(sum(M_Measure)<0,LightRed())”

QlikView