Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
swuehl
MVP
MVP

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

View solution in original post

3 Replies
swuehl
MVP
MVP

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
Author

Hi Stefan

It worked perfectly

Thanks a lot for your help!

Cheers Bruno

Not applicable
Author

Hi Stefan

It worked perfectly

Thanks a lot for your help!

Cheers Bruno