<?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 aggr function only resolving one calculation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/aggr-function-only-resolving-one-calculation/m-p/1611179#M45436</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am trying to display a ratio for each item in a pivot table. the items are buried under shift date -&amp;gt; shift code -&amp;gt; line -&amp;gt; item.&lt;BR /&gt;&lt;BR /&gt;here is what the result looks like:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qlik Aggr.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/16819i853E81A7B592E489/image-size/large?v=v2&amp;amp;px=999" role="button" title="Qlik Aggr.png" alt="Qlik Aggr.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;the formula takes what is produced for that specific line under the criteria then divides it by a ratio of standard run rate and "earned" line hours (based on lbs produced compared to run rate /hr)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is my formula:&lt;/P&gt;&lt;P&gt;aggr(NODISTINCT&lt;BR /&gt;(aggr(sum({$&amp;lt; [Data Type] = {'Volume'} &amp;gt;} [Total Quantity LBs]),ItemKey,ProductionLineID,[Shift Code],[Shift Date]))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;((sum(aggr((Sum( {$&amp;lt; [Data Type] = {'Volume'} &amp;gt;} [Total Quantity LBs])) /&lt;BR /&gt;(sum([WIP Productivity (lbs/hr)])*&lt;BR /&gt;(1-(([Waste % Per Prophix])+([Downtime % Per Prophix])))),ItemKey,ProductionLineID,[Shift Code],[Shift Date])))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;(sum(total &amp;lt;ItemKey,ProductionLineID,[Shift Code],[Shift Date]&amp;gt; aggr(&lt;BR /&gt;sum(aggr((Sum( {$&amp;lt; [Data Type] = {'Volume'} &amp;gt;} [Total Quantity LBs])) /&lt;BR /&gt;(sum([WIP Productivity (lbs/hr)])*&lt;BR /&gt;(1-(([Waste % Per Prophix])+([Downtime % Per Prophix])))),ItemKey,ProductionLineID,[Shift Code],[Shift Date]))&lt;BR /&gt;,ProductionLineID,[Shift Code],[Shift Date])))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;sum(total &amp;lt;ProductionLineID,[Shift Code],[Shift Date]&amp;gt; aggr(&lt;BR /&gt;sum(aggr(sum([Uptime Minutes])/60,ProductionLineID,[Shift Code],[Shift Date])),ProductionLineID,[Shift Code],[Shift Date]))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;([WIP Productivity (lbs/hr)]))&lt;/P&gt;&lt;P&gt;,ItemKey,ProductionLineID,[Shift Code],[Shift Date])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 05:01:21 GMT</pubDate>
    <dc:creator>tyember1</dc:creator>
    <dc:date>2024-11-16T05:01:21Z</dc:date>
    <item>
      <title>aggr function only resolving one calculation</title>
      <link>https://community.qlik.com/t5/App-Development/aggr-function-only-resolving-one-calculation/m-p/1611179#M45436</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;I am trying to display a ratio for each item in a pivot table. the items are buried under shift date -&amp;gt; shift code -&amp;gt; line -&amp;gt; item.&lt;BR /&gt;&lt;BR /&gt;here is what the result looks like:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Qlik Aggr.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/16819i853E81A7B592E489/image-size/large?v=v2&amp;amp;px=999" role="button" title="Qlik Aggr.png" alt="Qlik Aggr.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;the formula takes what is produced for that specific line under the criteria then divides it by a ratio of standard run rate and "earned" line hours (based on lbs produced compared to run rate /hr)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;This is my formula:&lt;/P&gt;&lt;P&gt;aggr(NODISTINCT&lt;BR /&gt;(aggr(sum({$&amp;lt; [Data Type] = {'Volume'} &amp;gt;} [Total Quantity LBs]),ItemKey,ProductionLineID,[Shift Code],[Shift Date]))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;((sum(aggr((Sum( {$&amp;lt; [Data Type] = {'Volume'} &amp;gt;} [Total Quantity LBs])) /&lt;BR /&gt;(sum([WIP Productivity (lbs/hr)])*&lt;BR /&gt;(1-(([Waste % Per Prophix])+([Downtime % Per Prophix])))),ItemKey,ProductionLineID,[Shift Code],[Shift Date])))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;(sum(total &amp;lt;ItemKey,ProductionLineID,[Shift Code],[Shift Date]&amp;gt; aggr(&lt;BR /&gt;sum(aggr((Sum( {$&amp;lt; [Data Type] = {'Volume'} &amp;gt;} [Total Quantity LBs])) /&lt;BR /&gt;(sum([WIP Productivity (lbs/hr)])*&lt;BR /&gt;(1-(([Waste % Per Prophix])+([Downtime % Per Prophix])))),ItemKey,ProductionLineID,[Shift Code],[Shift Date]))&lt;BR /&gt;,ProductionLineID,[Shift Code],[Shift Date])))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;sum(total &amp;lt;ProductionLineID,[Shift Code],[Shift Date]&amp;gt; aggr(&lt;BR /&gt;sum(aggr(sum([Uptime Minutes])/60,ProductionLineID,[Shift Code],[Shift Date])),ProductionLineID,[Shift Code],[Shift Date]))&lt;/P&gt;&lt;P&gt;*&lt;/P&gt;&lt;P&gt;([WIP Productivity (lbs/hr)]))&lt;/P&gt;&lt;P&gt;,ItemKey,ProductionLineID,[Shift Code],[Shift Date])&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:01:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/aggr-function-only-resolving-one-calculation/m-p/1611179#M45436</guid>
      <dc:creator>tyember1</dc:creator>
      <dc:date>2024-11-16T05:01:21Z</dc:date>
    </item>
    <item>
      <title>Re: aggr function only resolving one calculation</title>
      <link>https://community.qlik.com/t5/App-Development/aggr-function-only-resolving-one-calculation/m-p/1611185#M45439</link>
      <description>&lt;P&gt;It might be easier to help if you are able to share a sample.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2019 15:00:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/aggr-function-only-resolving-one-calculation/m-p/1611185#M45439</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-08-09T15:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: aggr function only resolving one calculation</title>
      <link>https://community.qlik.com/t5/App-Development/aggr-function-only-resolving-one-calculation/m-p/1617738#M45985</link>
      <description>&lt;P&gt;I am not sure how, but I resolved this issue. Sorry Sunny I cannot share sample data. Thank you for your response though.&lt;/P&gt;</description>
      <pubDate>Wed, 28 Aug 2019 14:49:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/aggr-function-only-resolving-one-calculation/m-p/1617738#M45985</guid>
      <dc:creator>tyember1</dc:creator>
      <dc:date>2019-08-28T14:49:02Z</dc:date>
    </item>
  </channel>
</rss>

