Bar chart with bar percent relative to entire chart
Hi Qlik community!
I have a bar graph that currently displays the counts of incidents. I also have a custom toggle, that when clicked, changes the KPI's on the sheet to a percentage, instead of a count. I want to implement this on a bar graph, but I am having an issue summing up all the values within the bar graph itself. Here is a picture of the current bar graph:
As you can see, the totals of the bars above add up to 42. So when I click the percentage toggle (not shown here), for the first bar at the top I expect to see 10/42*100 which would amount to 23.8 percent. However, I am getting 10/10 which is understandable because it is only counting the total for that dimension/measure combo.
So, does anyone know a calculation that will sum up the values from the entire bar chart, so that I can be able to divide by it to produce a percentage upon toggling?
Any help will be much appreciated!
EDIT/NOTE: The number needs to be dynamic, so I cannot create a static variable!
I cannot, unfortunately, as I am working with customer-sensitive production data. The bar chart consists of one dimension and two measures. The two measures are simply distinct counts of two different event types.
Please let me know if there is any more information you might need to better help with this.