<?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: Total function that works with filters in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Total-function-that-works-with-filters/m-p/80035#M5313</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks ,the ignore all selections is really useful! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2018 11:30:35 GMT</pubDate>
    <dc:creator>pascaldijkshoor</dc:creator>
    <dc:date>2018-06-26T11:30:35Z</dc:date>
    <item>
      <title>Total function that works with filters</title>
      <link>https://community.qlik.com/t5/App-Development/Total-function-that-works-with-filters/m-p/80032#M5310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently using the following formula to divide shipment revenue on assets: &lt;/P&gt;&lt;P&gt;sum (aggr (&lt;SPAN style="color: #ff0000;"&gt;&lt;SPAN style="color: #000000;"&gt;sum (Shipment_Productivity)/&lt;/SPAN&gt;sum (total &amp;lt;Shipment_Number_Linked&amp;gt; Shipment_Productivity)&lt;/SPAN&gt;* sum ({$&amp;lt;DEVIDED={'Y'}&amp;gt;}AMOUNT),Shipment_Number_Linked,Asset_Number,Key))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just found out that when I use a filter that's asset number related, the result of the formula is not correct anymore. I will explain this with the following example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one shipment which is transported with 2 assets. The part of the revenue that every asset gets is dependent on the productivity of that asset (simple example: 1 asset drove 40km with the shipment, the other 60km, so the division of that shipment's revenue is 40/60). So first the shipment productivity of the asset is calculated, and then divided by the total shipment productivity of both assets. After this the revenue of the shipment can fairly be divided on both assets. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when only 1 of the assets is selected, the total shipment productivity is now the total shipment productivity of the selected asset, and not of both assets anymore. This means the selected asset will get 100% of the shipment's revenue. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to solve this, so I can select a group of assets with the correct outcome of the formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 10:53:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Total-function-that-works-with-filters/m-p/80032#M5310</guid>
      <dc:creator>pascaldijkshoor</dc:creator>
      <dc:date>2018-06-26T10:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: Total function that works with filters</title>
      <link>https://community.qlik.com/t5/App-Development/Total-function-that-works-with-filters/m-p/80033#M5311</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;maybe you can add set analysis :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in sum(total &amp;lt;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;nbsp; ship_prod&lt;/P&gt;&lt;P&gt;add a set analysis like {$&amp;lt;Asset_Number=&amp;gt;}&lt;/P&gt;&lt;P&gt;this keep the selection, but remove selection on field asset_number&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 11:15:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Total-function-that-works-with-filters/m-p/80033#M5311</guid>
      <dc:creator>ogautier62</dc:creator>
      <dc:date>2018-06-26T11:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Total function that works with filters</title>
      <link>https://community.qlik.com/t5/App-Development/Total-function-that-works-with-filters/m-p/80034#M5312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this by ignoring Asset_Number selection in the denominator of your expression which will insure that any selection in Asset_Number doesn't change the number in the denominator.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(Sum(Shipment_Productivity)/Sum (&lt;SPAN style="color: #ff0000;"&gt;{&amp;lt;Asset_Number&amp;gt;}&lt;/SPAN&gt; TOTAL &amp;lt;Shipment_Number_Linked&amp;gt; Shipment_Productivity) * Sum {$&amp;lt;DEVIDED = {'Y'}&amp;gt;} AMOUNT), Shipment_Number_Linked, Asset_Number, Key))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or ignore all selections&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(Sum(Shipment_Productivity)/Sum (&lt;SPAN style="color: #ff0000;"&gt;{1}&lt;/SPAN&gt; TOTAL &amp;lt;Shipment_Number_Linked&amp;gt; Shipment_Productivity) * Sum {$&amp;lt;DEVIDED = {'Y'}&amp;gt;} AMOUNT), Shipment_Number_Linked, Asset_Number, Key))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 11:19:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Total-function-that-works-with-filters/m-p/80034#M5312</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-26T11:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Total function that works with filters</title>
      <link>https://community.qlik.com/t5/App-Development/Total-function-that-works-with-filters/m-p/80035#M5313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks ,the ignore all selections is really useful! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 11:30:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Total-function-that-works-with-filters/m-p/80035#M5313</guid>
      <dc:creator>pascaldijkshoor</dc:creator>
      <dc:date>2018-06-26T11:30:35Z</dc:date>
    </item>
  </channel>
</rss>

