QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

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) ).

Community Browser