<?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: Accumulating Quantity by Date via Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233397#M392743</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sometimes you could in such cases include an aggr-function, maybe like this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;{&amp;lt; &lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Product = {"=aggr(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=[&lt;SPAN style="color: #800000;"&gt;Due Date], [&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Due Date])&lt;/SPAN&gt;"}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;whereby this caused an increase of complexity and I'm not sure if the performance then is always better as by an if-loop - whereby I suggest to transfer the if-loop from the inside to the outside:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;DueDate, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Dec 2016 06:24:10 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2016-12-12T06:24:10Z</dc:date>
    <item>
      <title>Accumulating Quantity by Date via Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233391#M392737</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;I have two tables, one called "Sales_Orders" and the other called "Production_Orders", related via the Product name.&lt;/P&gt;&lt;P&gt;The Sales_Orders table (simplified) has fields S/O Number, Quantity required, and Due Date.&lt;/P&gt;&lt;P&gt;The Production_Orders table (simplified) has fields JobNumber, QtyToMake, and ExFactoryDate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;Sales_Orders&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&amp;nbsp; Production_Orders&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Product&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: line-through;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product&lt;/P&gt;&lt;P&gt;&amp;nbsp; S/O Number&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JobNumber&lt;/P&gt;&lt;P&gt;&amp;nbsp; Quantity&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; QtyToMake&lt;/P&gt;&lt;P&gt;&amp;nbsp; Due Date&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ExFactoryDate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jobs are often manufactured in quantities that are less than a particular Sales Order demand.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a Straight Table Chart, I am determining whether there is going to be sufficient Product made to meet the Sales demand, by using the following expression:&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;&amp;nbsp; [InTime Job Qty]&lt;/SPAN&gt; = &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;Due Date,&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,0)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;This expression works fine, but I would really like to turn it into a Set Analysis expression. This will enable me to be more flexible with other things I want to do with the data later.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;But I am having real difficulty in determining what the syntax of the Set Analysis expression should be, and whether I need to use the aggr() function - and if so, how.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I can see that somehow I need to have a set of records where the ExFactoryDate in the Production_Orders table is less than or equal to the Due Date of the record of interest in the Sales_Orders table. But the syntax escapes me and I haven't been able to find a thread yet to lead me on the right track.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Can anyone point me to the answer please?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Many thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Pete&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 01:11:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233391#M392737</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-12-09T01:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulating Quantity by Date via Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233392#M392738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could try something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;{&amp;lt; &lt;SPAN style="color: #800000; font-size: 10pt;"&gt;QtyToMake = {"=&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;Due Date"}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2016 09:15:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233392#M392738</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-09T09:15:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulating Quantity by Date via Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233393#M392739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcus, but the fix doesn't work as hoped.&lt;/P&gt;&lt;P&gt;It's helped me though to better understand what's happening with the data, so hopefully I will be able to formulate a working expression soon.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2016 04:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233393#M392739</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-12-10T04:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulating Quantity by Date via Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233394#M392740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marcus was able to direct me to writing a syntax-correct expression. The problem is now one that I think may be essentially impossible to solve - at least easily - as a set expression, and therefore I am currently defaulting to using the original expression that works: &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;DueDate,&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,0)).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;{&amp;lt; &lt;SPAN style="color: #800000; font-size: 10pt;"&gt;QtyToMake = {"=&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;DueDate"}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) expression works but ONLY when there is just one 'DueDate' per Product. My problem arises when there are two or more rows of Sales Orders for the same Product, but those rows have differing Due Dates. In the set calculation, it appears that QlikView is taking the 'DueDate' value to be the last (since the order is set as ascending, therefore the latest) date. So often, this causes incorrect calculations to be made for the earlier rows.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I can see now that this is probably exactly the way that QV is supposed to work, sets are not really designed to be calculated row by row. I am parking the problem for now, I need to understand a bit more about sets and syntax before (if) I decide to come back to it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Pete&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 01:20:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233394#M392740</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-12-12T01:20:46Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulating Quantity by Date via Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233395#M392741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;&lt;SPAN style="color: #ff0000;"&gt;Product&lt;/SPAN&gt; = {"=ExFactoryDate&amp;lt;=DueDate"}&amp;gt;} QtyToMake)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 01:46:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233395#M392741</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-12T01:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulating Quantity by Date via Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233396#M392742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks. Your formula is actually more solid than using 'QtyToMake' on the LHS of the set modifier expression. Indeed, when I used Marcus' suggestion first off in my table, I actually substituted 'QtyToMake' with 'JobNumber' to create a better solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But regardless, the expressions &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;{&amp;lt; &lt;SPAN style="color: #800000; font-size: 10pt;"&gt;JobNumber = {"=&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;DueDate"}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) and your suggestion &lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;sum&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="font-size: 10pt;"&gt;(&lt;SPAN style="color: #0000ff;"&gt;{&amp;lt; &lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Product = {"=&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;DueDate"}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;) both produce the same results which are, as explained in my earlier post of today, occasionally but not always correct.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I believe the crux of my problem boils down to the fact that in the part of the expression that features the set &lt;SPAN style="color: #800000;"&gt;{"=&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;DueDate"}&lt;/SPAN&gt;, DueDate needs to adopt the value of the individual Sales Order row that is being addressed, and I can't seem to figure out how to do that. Or whether it is even possible to do that, when there are multiple lines for the same Product and each line may have a different DueDate.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Pete&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 02:29:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233396#M392742</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-12-12T02:29:52Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulating Quantity by Date via Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233397#M392743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sometimes you could in such cases include an aggr-function, maybe like this one:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;{&amp;lt; &lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Product = {"=aggr(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=[&lt;SPAN style="color: #800000;"&gt;Due Date], [&lt;SPAN style="color: #800000; font-size: 10pt;"&gt;Due Date])&lt;/SPAN&gt;"}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;whereby this caused an increase of complexity and I'm not sure if the performance then is always better as by an if-loop - whereby I suggest to transfer the if-loop from the inside to the outside:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;DueDate, &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 06:24:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233397#M392743</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-12-12T06:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulating Quantity by Date via Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233398#M392744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Update ...&lt;/P&gt;&lt;P&gt;Thanks for persevering with suggestions, Marcus.&lt;/P&gt;&lt;P&gt;Unfortunately, neither the aggregated function you put forward, nor the If statement wrapped on the outside, produces the correct results like the original internally-positioned If statement - &lt;SPAN style="font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;(&lt;SPAN style="color: #0000ff;"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color: #800000;"&gt;ExFactoryDate&lt;/SPAN&gt;&amp;lt;=&lt;SPAN style="color: #800000;"&gt;Due Date,&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;QtyToMake&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;,0))&lt;/SPAN&gt; - did.&lt;/P&gt;&lt;P&gt;However, I'm more comfortable now that I haven't overlooked something obvious. And the original If statement is not affecting performance, my data set simply isn't big enough (nor ever will be) for that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 01:19:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233398#M392744</guid>
      <dc:creator>peter_burgess</dc:creator>
      <dc:date>2016-12-13T01:19:12Z</dc:date>
    </item>
    <item>
      <title>Re: Accumulating Quantity by Date via Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233399#M392745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please close this thread by marking your own response as correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Dec 2016 01:26:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Accumulating-Quantity-by-Date-via-Set-Analysis/m-p/1233399#M392745</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-12-13T01:26:24Z</dc:date>
    </item>
  </channel>
</rss>

