Friday, October 3, 2014

This post is about creating a Gantt chart in Qlikview.

Gantt Chart according to google is
  1. "A chart in which a series of horizontal lines shows the amount of work done or production completed in certain periods of time in relation to the amount planned for those periods." 

Let's take a simple example: A chart to show the tenure of chief ministers of Tamil nadu. 


LOAD "#[9]", 
 [Took office],
 [Left office],
Date(Date#(SubField([Took office],'[',1), 'DD MMM YY'), 'M/D/YYYY') as TookOffice,
Date(Date#(SubField([Left office],'[',1), 'DD MMM YY'), 'M/D/YYYY') as LeftOffice,
     "Political party[26]", 
(html, codepage is 1252, embedded labels, table is @3);


1.Create a bar chart

Dimensions: Name, Election
Measure: interval(LeftOffice-TookOffice,'DD') that is the difference between your dates
in bar offset give the first date( the second in the subtraction of interval)

In style- select orientation as horizontal 

uncheck forced zero

Change the format of interval to date and in the format pattern change it to DD/MM/YYYY

Result: We get the list of CM's, their tenure as a gantt chart.

0 Scribbles:

Post a Comment

Thank You for taking pains, commenting :)


Search This Blog