<?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 Using TOTAL in pivot table in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2089572#M89306</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to know a product family's share of sales of the total sales. I want to plot this over a number of years in a pivot table. The function I use is sum(sales)/sum(TOTAL sales). See attached a simplified example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, this calculates the total of all years together and not the total of the year which is displayed in the pivot table column. How can I realise this?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE:&amp;nbsp; the datamodel contains 10 years of data. With use of a filter the user can choose whether to display 1,2,3 years etc. So in the example attached a filter&amp;nbsp;is placed for the years 2023,2022, 2021.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 30 Jun 2023 13:49:29 GMT</pubDate>
    <dc:creator>Giel0</dc:creator>
    <dc:date>2023-06-30T13:49:29Z</dc:date>
    <item>
      <title>Using TOTAL in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2089572#M89306</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I would like to know a product family's share of sales of the total sales. I want to plot this over a number of years in a pivot table. The function I use is sum(sales)/sum(TOTAL sales). See attached a simplified example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, this calculates the total of all years together and not the total of the year which is displayed in the pivot table column. How can I realise this?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE:&amp;nbsp; the datamodel contains 10 years of data. With use of a filter the user can choose whether to display 1,2,3 years etc. So in the example attached a filter&amp;nbsp;is placed for the years 2023,2022, 2021.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 13:49:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2089572#M89306</guid>
      <dc:creator>Giel0</dc:creator>
      <dc:date>2023-06-30T13:49:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOTAL in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2089598#M89309</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/185925"&gt;@Giel0&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Can you try using:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum(sales)/sum(TOTAL &lt;STRONG&gt;&amp;lt;Year&amp;gt;&lt;/STRONG&gt; sales)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;This will make that your "Year" Field, will be considerated on the calculation.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;-Zapparoli&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 14:30:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2089598#M89309</guid>
      <dc:creator>Zapparoli</dc:creator>
      <dc:date>2023-06-30T14:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOTAL in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2089844#M89338</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/125250"&gt;@Zapparoli&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, that works!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However, the calculation is correct when no filters are being placed on a product family. When I filter by a specific product family to do an analysis, the total count is also filtered as 100%. How can I extend the set analysis so that the filter on "Product family" is excluded and the 'total sales' stays the same?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 07:22:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2089844#M89338</guid>
      <dc:creator>Giel0</dc:creator>
      <dc:date>2023-07-03T07:22:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOTAL in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2090004#M89352</link>
      <description>&lt;P&gt;You need to add a set analysis which ignored certain or maybe all selections, for example:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum(sales)/sum(&lt;STRONG&gt;{&amp;lt; Productfamily &amp;gt; }&lt;/STRONG&gt; TOTAL&amp;nbsp;&lt;/SPAN&gt;&amp;lt;Year&amp;gt;&lt;SPAN&gt;&amp;nbsp;sales)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;sum(sales)/sum(&lt;STRONG&gt;{1}&lt;/STRONG&gt; TOTAL&amp;nbsp;&amp;lt;Year&amp;gt;&amp;nbsp;sales)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 12:01:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2090004#M89352</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-07-03T12:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using TOTAL in pivot table</title>
      <link>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2090385#M89377</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;thanks, that's exactly what I was looking for!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Jul 2023 13:24:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-TOTAL-in-pivot-table/m-p/2090385#M89377</guid>
      <dc:creator>Giel0</dc:creator>
      <dc:date>2023-07-04T13:24:21Z</dc:date>
    </item>
  </channel>
</rss>

