<?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: simplify formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555726#M207513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what you mean by if there is only one row in the PITYear and PITPeriod data island. There are over 3000 rows in that table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use it so users can select a period to view the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For exsample see the aftachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PIT.JPG" class="jive-image" src="https://community.qlik.com/legacyfs/online/48415_PIT.JPG" style="width: 620px; height: 162px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Oct 2013 14:34:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-31T14:34:24Z</dc:date>
    <item>
      <title>simplify formula</title>
      <link>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555724#M207511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My processor is to slow when I use the formulea:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;sum&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Source&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={Sales}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;GL_1&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={VOL}&amp;gt;}&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;InYearToDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;EffectiveDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,'01-'&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PITPeriod&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;amp;'-'&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;PITYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,0,4),&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Data&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The database is over 50 million record. Structure as in the attachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know a why to de-stress my processor?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;René&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 13:45:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555724#M207511</guid>
      <dc:creator />
      <dc:date>2013-10-31T13:45:47Z</dc:date>
    </item>
    <item>
      <title>Re: simplify formula</title>
      <link>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555725#M207512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;PITPeriod and PITYear are in a data island. That means the expression is calculated over a cartesian product. If there is only one row in that table then you could create a flag field in the script so the if statement can be replaced in your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load x,y,z,&lt;/P&gt;&lt;P&gt;-1*InYearToDate(EffectiveDate,'01-'&amp;amp; peek('PITPeriod')&amp;amp;'-'&amp;amp; peek('PITYear'),0,4) as IsYTD&lt;/P&gt;&lt;P&gt;from ...;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression could then change to sum(({&amp;lt;Source={Sales}, GL_1={VOL}, IsYTD={1}&amp;gt;}Data)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 14:16:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555725#M207512</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-10-31T14:16:28Z</dc:date>
    </item>
    <item>
      <title>Re: simplify formula</title>
      <link>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555726#M207513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure what you mean by if there is only one row in the PITYear and PITPeriod data island. There are over 3000 rows in that table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use it so users can select a period to view the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For exsample see the aftachment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PIT.JPG" class="jive-image" src="https://community.qlik.com/legacyfs/online/48415_PIT.JPG" style="width: 620px; height: 162px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 14:34:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555726#M207513</guid>
      <dc:creator />
      <dc:date>2013-10-31T14:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: simplify formula</title>
      <link>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555727#M207514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, that data island is most likely responsible for a large part of your performance troubles since it means you need that expensive if statement. Your probably far better off with a master calendar that is properly associated with your other tables. See this discussion: &lt;A _jive_internal="true" href="https://community.qlik.com/thread/66717" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;Tutorial - Using Common Date Dimensions and Shared Calendars&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 14:43:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555727#M207514</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-10-31T14:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: simplify formula</title>
      <link>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555728#M207515</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;First try to create a variable which contains the value of PITYear and PITPeriod.&lt;/P&gt;&lt;P&gt;If it's still not good.&lt;/P&gt;&lt;P&gt;Then, you can try to create another field which you can use in a set analysis instead of a If.&lt;/P&gt;&lt;P&gt;As you want that your year starts in April, you can add a CorrectedYear in your model (which is 2012 for an effectivedate before April else 2013), and just compare this field with PITYear in a set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 14:53:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555728#M207515</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2013-10-31T14:53:01Z</dc:date>
    </item>
    <item>
      <title>Re: simplify formula</title>
      <link>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555729#M207516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! Off course creating a variabel based upon the PIT selection was the answer.&lt;/P&gt;&lt;P&gt;Makes sense now...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Oct 2013 15:09:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simplify-formula/m-p/555729#M207516</guid>
      <dc:creator />
      <dc:date>2013-10-31T15:09:21Z</dc:date>
    </item>
  </channel>
</rss>

