Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

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

Cumulative Percentage Line on Bar Graph

I want to add a cumulative line on a bar graph to indicate how much each bar is contributing to the total.

Since I don't think we have dual-axis (to make the line on a different scale (0-100%)), I am trying to make it scale to the current axis.

So far I can get the percentage by using:

=COUNT(DISTINCT Customer)/COUNT(TOTAL DISTINCT Customer)

And now if I can multiply this by the largest bar, I will have what I need.  I tried different combinations with Max and Aggr, but I was not successful.  In the attached file I just hard-coded the value (3705) I want, but this will not work if I filter.

Let me know how I can replace the 3705 with a formula, or if there is a better way to get this cumulative percent line on the graph.

It might make it a little more complex in that I am using a calculated dimension for the bars instead of a field (=aggr(COUNT(DISTINCT Product),Customer) ).