Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Calculating index in a Line Chart

Hi all

I've run in to a problem calculating an index in line charts, where index 100 is the first year selected in my list box containing my variable "Year" (from 2005-2012). 

I want the index chart to look somewhat like #2 and #3 underneath (#1 is the "normal" line chart), and the index should only be calulated in the selected years (#2 has all years selected, and #3 has 2007-2011 selected). The dots in the index line chart should be calculated like this: (First Year in selection/Year)*100. For example in #3 this means:

     - value for Year "2007": (6333/6333)*100=100

     - value for Year "2008": (6333/5482)*100=87

     - value for Year "2009": (6333/6666)*100=105

... and so on.

Can anyone help me on this one?

Thanks in advance

Cheers

Bruno

Excel Charts.pngFor

1 Solution

Accepted Solutions
MVP
MVP

Re: Calculating index in a Line Chart

Look into the chart inter record functions, namely top(). top() will return your expression evaluated in the context of your first dimension value, so try something like

=top( count(Frequency) ) / count(Frequency)  * 100

Replace count(Frequency) with the expression you are currently using.

Hope this helps,

Stefan

3 Replies
MVP
MVP

Re: Calculating index in a Line Chart

Look into the chart inter record functions, namely top(). top() will return your expression evaluated in the context of your first dimension value, so try something like

=top( count(Frequency) ) / count(Frequency)  * 100

Replace count(Frequency) with the expression you are currently using.

Hope this helps,

Stefan

Not applicable

Re: Calculating index in a Line Chart

Hi Stefan

It worked perfectly

Thanks a lot for your help!

Cheers Bruno

Not applicable

Re: Calculating index in a Line Chart

Hi Stefan

It worked perfectly

Thanks a lot for your help!

Cheers Bruno