<?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: Removing Sum(if()) (because it's slow as hell) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436269#M431448</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are created from two timestamps that are pulled in from a qvd and are linked to a 'person' (unique identifier).&lt;/P&gt;&lt;P&gt;I use this expression to show a figure for every week going back to 2012 in a straight table, the weekstart days are currently stored in a mastercalendar on their own.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have another straight table, with the same expression, that shows the 'person''s with a period between the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vRealDateDelayStart and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vRealDateDelayEnd for whichever week is chosen within the first table. Confusing?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 06 Dec 2017 09:49:17 GMT</pubDate>
    <dc:creator>quilldew</dc:creator>
    <dc:date>2017-12-06T09:49:17Z</dc:date>
    <item>
      <title>Removing Sum(if()) (because it's slow as hell)</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436267#M431446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gang,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This one may be a bit confusing so please bear with me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a script, that works, but is slow slow slow and replicated over many straight tables.&lt;/P&gt;&lt;P&gt;I'm looking for a way to move the sums to the load script, but I'm also open to suggestions as to how to speed these up. I can't post a qvw here, because of the sensitive nature of the data, but I'll put up the code I can.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So one of the sums looks like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(&lt;/P&gt;&lt;P&gt;if($(vRealDateDelayStart)&amp;lt;=floor(WeekEnd(WeekStartDay))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,if($(vRealDateDelayEnd) &amp;gt;= WeekStartDay&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,if($(vRealDateDelayEnd) &amp;lt;= floor(WeekEnd(WeekStartDay))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,if($(vRealDateDelayStart) &amp;gt;= WeekStartDay&lt;/P&gt;&lt;P&gt;,($(vRealDateDelayEnd) - $(vRealDateDelayStart)) +1&lt;/P&gt;&lt;P&gt;,($(vRealDateDelayEnd) - WeekStartDay) +1&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;,if($(vRealDateDelayStart) &amp;gt;= WeekStartDay&lt;/P&gt;&lt;P&gt;,(floor(WeekEnd(WeekStartDay)) - $(vRealDateDelayStart)) +1&lt;/P&gt;&lt;P&gt;,(floor(WeekEnd(WeekStartDay)) - WeekStartDay) +1&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,if(isnull($(vRealDateDelayEnd)) and $(vRealDateDelayStart) &amp;lt;= floor(WeekEnd(WeekStartDay))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,if($(vRealDateDelayStart) &amp;lt; WeekStartDay&lt;/P&gt;&lt;P&gt;,(floor(WeekEnd(WeekStartDay)) - WeekStartDay) +1&lt;/P&gt;&lt;P&gt;,(floor(WeekEnd(WeekStartDay)) - $(vRealDateDelayStart)) +1&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The variables are start and end dates created from a timestamp.&lt;/P&gt;&lt;P&gt;I'm sure there will be lots of questions. Hit me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 09:27:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436267#M431446</guid>
      <dc:creator>quilldew</dc:creator>
      <dc:date>2017-12-06T09:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Sum(if()) (because it's slow as hell)</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436268#M431447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you're only comparing stuff with WeekStartDay. It shouldn't be too hard to move those comparisons to the script and create a new field to flag the matching records. What timestamp are the variables created from? From value selected in a field or user input or a value like Today's date?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 09:41:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436268#M431447</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-12-06T09:41:30Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Sum(if()) (because it's slow as hell)</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436269#M431448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are created from two timestamps that are pulled in from a qvd and are linked to a 'person' (unique identifier).&lt;/P&gt;&lt;P&gt;I use this expression to show a figure for every week going back to 2012 in a straight table, the weekstart days are currently stored in a mastercalendar on their own.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also have another straight table, with the same expression, that shows the 'person''s with a period between the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vRealDateDelayStart and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;vRealDateDelayEnd for whichever week is chosen within the first table. Confusing?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 09:49:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436269#M431448</guid>
      <dc:creator>quilldew</dc:creator>
      <dc:date>2017-12-06T09:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Sum(if()) (because it's slow as hell)</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436270#M431449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps you're looking for something like this: &lt;A href="https://community.qlik.com/qlik-blogpost/2940"&gt;Creating Reference Dates for Intervals&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 10:20:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436270#M431449</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2017-12-06T10:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Sum(if()) (because it's slow as hell)</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436271#M431450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That does look like it could help. I will take a good look at it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried moving my above code to the script, and creating a new table using group by, for some reason it is giving me an error that it is expecting a ')' , but when checking the code all the '()' are paired.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Dec 2017 10:55:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436271#M431450</guid>
      <dc:creator>quilldew</dc:creator>
      <dc:date>2017-12-06T10:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Removing Sum(if()) (because it's slow as hell)</title>
      <link>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436272#M431451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was a real big help and information I can use for other projects in future thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Dec 2017 15:17:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Removing-Sum-if-because-it-s-slow-as-hell/m-p/1436272#M431451</guid>
      <dc:creator>quilldew</dc:creator>
      <dc:date>2017-12-18T15:17:59Z</dc:date>
    </item>
  </channel>
</rss>

