<?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 Aggregating in a specific part of a chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2444878#M97601</link>
    <description>&lt;P&gt;I have created a bar chart with data that drills down. I am having problems with calculations in that chart. There are two filters, the bigger one is sports and the smaller one is athletes. Given the 5 biggest athletes in a few major sports, I want the chart to show a % of pay each of those athletes gets out of the sum of all 5 athletes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My current code looks something like this:&lt;/P&gt;
&lt;P&gt;Sum(Athletes_money)/sum(total Athletes_money)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This works when a specific sport is chosen, but when no filter is chosen and the bar chart shows all sports separate, the individual athletes money is divided by all of the athletes that are in the filter. Is it possible to make the denominator the total of just the athletes sports grouping instead of all athletes?&lt;/P&gt;</description>
    <pubDate>Thu, 25 Apr 2024 13:13:53 GMT</pubDate>
    <dc:creator>mcsmithums1</dc:creator>
    <dc:date>2024-04-25T13:13:53Z</dc:date>
    <item>
      <title>Aggregating in a specific part of a chart</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2444878#M97601</link>
      <description>&lt;P&gt;I have created a bar chart with data that drills down. I am having problems with calculations in that chart. There are two filters, the bigger one is sports and the smaller one is athletes. Given the 5 biggest athletes in a few major sports, I want the chart to show a % of pay each of those athletes gets out of the sum of all 5 athletes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My current code looks something like this:&lt;/P&gt;
&lt;P&gt;Sum(Athletes_money)/sum(total Athletes_money)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This works when a specific sport is chosen, but when no filter is chosen and the bar chart shows all sports separate, the individual athletes money is divided by all of the athletes that are in the filter. Is it possible to make the denominator the total of just the athletes sports grouping instead of all athletes?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2024 13:13:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2444878#M97601</guid>
      <dc:creator>mcsmithums1</dc:creator>
      <dc:date>2024-04-25T13:13:53Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating in a specific part of a chart</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2445087#M97613</link>
      <description>&lt;P&gt;Perhaps this?&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum(Athletes_money)/sum({&amp;lt;Sports={'athletes'}&amp;gt;}total Athletes_money)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Or&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum(Athletes_money)/sum(total &amp;lt;FieldName&amp;gt; Athletes_money)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 04:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2445087#M97613</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2024-04-26T04:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating in a specific part of a chart</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2445090#M97614</link>
      <description>&lt;P&gt;I agree with Anil, that&lt;/P&gt;
&lt;P&gt;Sum(Athletes_money)/sum(total &amp;lt;Sport&amp;gt; Athletes_money)&lt;/P&gt;
&lt;P&gt;could&amp;nbsp; be what you are looking for.&lt;/P&gt;
&lt;P&gt;The denominator will be the total Athletes money per sport. Important that the Sport dimension is included in your chart.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 04:38:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2445090#M97614</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2024-04-26T04:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating in a specific part of a chart</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2445399#M97646</link>
      <description>&lt;P&gt;Definitely helpful and what I was looking for thank you. Now that that data is working in my graph, how can I create a kpi that sums up all of the percentages? This number should be 100% times the number of sports, but it is helpful to me. If I copy and paste this code into a KPI it is giving the wrong number.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2024 17:46:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2445399#M97646</guid>
      <dc:creator>mcsmithums1</dc:creator>
      <dc:date>2024-04-26T17:46:37Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating in a specific part of a chart</title>
      <link>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2445887#M97665</link>
      <description>&lt;P&gt;Consider this script&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LOAD * inline [
ID, Sport, Athletes_money
1,Tennis, 10
2,Tennis, 10
3,Tennis, 10
4,Tennis, 10
5,Fotball, 20
6,Fotball, 20
7,Fotball, 20
8,Fotball, 20
9,Fotball, 20
10,Figure skating, 30
11,Figure skating, 30
];&lt;/LI-CODE&gt;
&lt;P&gt;Then you can calculate the precentage of sport on row level, but aggregate it to the total using sum (aggr()) like this&amp;nbsp;&lt;FONT face="courier new,courier"&gt;sum(aggr(sum(Athletes_money)/&lt;/FONT&gt;&lt;FONT face="courier new,courier"&gt;sum(total &amp;lt;Sport&amp;gt; Athletes_money),Sport,ID))&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Vegar_0-1714332253543.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/164889i4EB099427C83F592/image-size/large?v=v2&amp;amp;px=999" role="button" title="Vegar_0-1714332253543.png" alt="Vegar_0-1714332253543.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2024 19:24:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Aggregating-in-a-specific-part-of-a-chart/m-p/2445887#M97665</guid>
      <dc:creator>Vegar</dc:creator>
      <dc:date>2024-04-28T19:24:34Z</dc:date>
    </item>
  </channel>
</rss>

