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: 
Anonymous
Not applicable

Add running total to bar chart in reference line

I have a bar chart that plots the number of people who fit a set of categorical values within a particular field (called FieldA here). I'm trying to add a reference line to this bar chart that plots a running total across these categorical values.

I've been able to generate the correct numerical values (ie, the number of people who fit each category, accumulating for each new row in the table) for the reference line by using the following expression within a table:

=RangeSum( Above(Count(FieldA),0,RowNo()) )


However, this expression doesn't generate a plotted line when I place it in the reference line field for my bar chart.

Is there a way to adjust the expression to make it function within the reference line field?

3 Replies
sunny_talwar

You will have to use at an expression. It is not going to work as a reference line because reference lines are static lines. But this one is changing based on the dimension.

Anonymous
Not applicable
Author

For clarification, are you saying that reference lines must be a) linear and b) either horizontal or vertical only (and depending on chart orientation)? And that any expressions entered into the expression field for reference line most conform to these expectations to be plotted?

sunny_talwar

Yes, as per my understanding that's what it needs to be. Reference lines are cannot be moving lines because then they become expressions (line chart or combo chart). Why use reference line if you can replicate it using a line expression