<?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 Re: Re: Calculate the relative percent in a line chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658510#M240316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to hear, glad it worked out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Aug 2014 20:30:58 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-12T20:30:58Z</dc:date>
    <item>
      <title>Calculate the relative percent in a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658504#M240310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems like it should be simple... I have a simple line chart showing the percent of the total population each ethnicity represents. Or at least that's what I want. But there doesn't appear to be an easy way to calculate this percentage. The graph below gives a general idea of what I'm trying to do, but you'll notice that for each year, the different ethnicity populations do not total to 100% because the the "relative" option just computes a TOTAL over all dimensions, which since I have both ethnicity and year as dimensions, is not correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/64185_Capture.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I tell the chart to compute the percentage for EACH YEAR rather than over all years??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Aug 2014 21:57:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658504#M240310</guid>
      <dc:creator>bdiamante</dc:creator>
      <dc:date>2014-08-11T21:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the relative percent in a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658505#M240311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See attached example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Basically I&amp;nbsp; do this: sum(yourfield)/sum(Total &amp;lt;Year&amp;gt; yourfield)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 'Total &amp;lt;Year&amp;gt;' will ignore ethnicity as a dimension and allow you to sum all records per year, which you need to so you can create a proportion that adds to 1 per year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 00:43:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658505#M240311</guid>
      <dc:creator />
      <dc:date>2014-08-12T00:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the relative percent in a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658506#M240312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=Sum(MeasureName)/Sum(TOTAL&amp;lt;Year&amp;gt; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;MeasureName&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;This will calculate the percentages by Year, ignoring the Ethnicity_Code dimension.&amp;nbsp; Hope this helps you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Jagan.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 01:28:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658506#M240312</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2014-08-12T01:28:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the relative percent in a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658507#M240313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Brian,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Were you able to resolve this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 18:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658507#M240313</guid>
      <dc:creator />
      <dc:date>2014-08-12T18:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Calculate the relative percent in a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658508#M240314</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not exactly. I think something else might be impacting what's happening here. I actually had my expression set up to do exactly what the other commenters suggested:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_1407868827328554" jivemacro_uid="_1407868827328554"&gt;
&lt;P&gt;sum({Global&amp;lt;subject_code=, assessment_code=&amp;gt; * HomeSchool}number_ethnicity_gender_enrolled) / sum({Global&amp;lt;subject_code=, assessment_code=, data_year=&amp;gt; * HomeSchool} TOTAL number_ethnicity_gender_enrolled)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use states pretty heavily in this dashboard. So it's a bit convoluted...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Global state:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/64268_Capture.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The HomeSchool State&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/64267_Capture.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The population that's left after the set analysis is a single school's records, for all years. I thought that the above formula would work as well, but it hasn't and I've tried a few different variations, but still cannot get the correct percentage...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 18:50:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658508#M240314</guid>
      <dc:creator>bdiamante</dc:creator>
      <dc:date>2014-08-12T18:50:45Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Calculate the relative percent in a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658509#M240315</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My mistake, I did not have the formula you suggested. It's amazing the tricks your eyes can play on you after a long day... So having the TOTAL &amp;lt;data_year&amp;gt; before my set analysis did the trick...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro _jivemacro_uid_14078698674985602 jive_macro_code" jivemacro_uid="_14078698674985602"&gt;
&lt;P&gt;sum({Global&amp;lt;subject_code=, assessment_code=, data_year=&amp;gt; * HomeSchool}number_ethnicity_gender_enrolled) / sum(TOTAL&amp;lt;data_year&amp;gt; {Global&amp;lt;subject_code=, assessment_code=&amp;gt; * HomeSchool} number_ethnicity_gender_enrolled)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was not aware TOTAL was being treated as a set, I just thought it was a keyword. Is that what's happening here?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 18:59:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658509#M240315</guid>
      <dc:creator>bdiamante</dc:creator>
      <dc:date>2014-08-12T18:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Calculate the relative percent in a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658510#M240316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to hear, glad it worked out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 20:30:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/658510#M240316</guid>
      <dc:creator />
      <dc:date>2014-08-12T20:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the relative percent in a line chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/2068974#M1223571</link>
      <description>&lt;P&gt;This worked well - cheers&lt;/P&gt;</description>
      <pubDate>Tue, 09 May 2023 05:43:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-relative-percent-in-a-line-chart/m-p/2068974#M1223571</guid>
      <dc:creator>Dan36</dc:creator>
      <dc:date>2023-05-09T05:43:22Z</dc:date>
    </item>
  </channel>
</rss>

