<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Cumulative Percentage Line on Bar Graph in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cumulative-Percentage-Line-on-Bar-Graph/m-p/969389#M647308</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to add a cumulative line on a bar graph to indicate how much each bar is contributing to the total.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I can get the percentage by using:&lt;/P&gt;&lt;P&gt;=COUNT(DISTINCT Customer)/COUNT(TOTAL DISTINCT Customer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now if I can multiply this by the largest bar, I will have what I need.&amp;nbsp; I tried different combinations with Max and Aggr, but I was not successful.&amp;nbsp; In the attached file I just hard-coded the value (3705) I want, but this will not work if I filter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might make it a little more complex in that I am using a calculated dimension for the bars instead of a field (&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Product&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Customer&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 30 Sep 2015 14:53:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-09-30T14:53:03Z</dc:date>
    <item>
      <title>Cumulative Percentage Line on Bar Graph</title>
      <link>https://community.qlik.com/t5/QlikView/Cumulative-Percentage-Line-on-Bar-Graph/m-p/969389#M647308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to add a cumulative line on a bar graph to indicate how much each bar is contributing to the total.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So far I can get the percentage by using:&lt;/P&gt;&lt;P&gt;=COUNT(DISTINCT Customer)/COUNT(TOTAL DISTINCT Customer)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And now if I can multiply this by the largest bar, I will have what I need.&amp;nbsp; I tried different combinations with Max and Aggr, but I was not successful.&amp;nbsp; In the attached file I just hard-coded the value (3705) I want, but this will not work if I filter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It might make it a little more complex in that I am using a calculated dimension for the bars instead of a field (&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Product&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Customer&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Sep 2015 14:53:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cumulative-Percentage-Line-on-Bar-Graph/m-p/969389#M647308</guid>
      <dc:creator />
      <dc:date>2015-09-30T14:53:03Z</dc:date>
    </item>
  </channel>
</rss>

