<?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: Performance and clearness in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Performance-and-clearness/m-p/28220#M608371</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({1&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATATYPE={'ACTUAL'},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BILL_YEAR = &lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;$(=pick(ceil(getselectedcount(BILL_YEAR) / 100) + 1, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '{"&amp;lt;' &amp;amp; num(month(today())) &amp;amp; '"}', 'p(BILL_YEAR)'))&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BILL_MONTH = &lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;$(=pick(ceil(getselectedcount(BILL_MONTH) / 12) + 1, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '{"&amp;lt;' &amp;amp; num(month(today())) &amp;amp; '"}', 'p(BILL_MONTH)')) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which avoids the doubled calculation through the if-loop (all branches of an if-loop will always be calculated) and further the concat-aggregations within set analysis which without a DISTINCT might return a very large data-set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Mar 2018 11:07:14 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2018-03-29T11:07:14Z</dc:date>
    <item>
      <title>Performance and clearness</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-and-clearness/m-p/28219#M608370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to implement a very useful formula within my qlikview application and was very suprised about the impact on the application-performance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 8pt;"&gt;If(GetSelectedCount(BILL_MONTH) = 0,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;SUM({1&amp;lt;DATATYPE={'ACTUAL'},BILL_YEAR = {$(=If(GetSelectedCount(BILL_YEAR) = 0, date(addmonths(today(),-1),'YYYY'), Concat(BILL_YEAR, ',')))},BILL_MONTH={"&amp;lt;=$(=date(addmonths(today(),-1),'MM'))"}&amp;gt;}SALES),&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;SUM({1&amp;lt;DATATYPE={'ACTUAL'},BILL_YEAR = {$(=If(GetSelectedCount(BILL_YEAR) = 0, date(addmonths(today(),-1),'YYYY'), Concat(BILL_YEAR, ',')))}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;,BILL_MONTH={$(=Concat(BILL_MONTH, ','))}&amp;gt;}SALES)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-size: 8pt;"&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;The purpose of this code snippet is to provide the user a default view if no selection was made. GetSelectedCount is a very useful function but it made the code a bit more complex. E.g. the main reason of the surrounding if-condition is, that I'm not able to tell qlik that it should take all months less than month today.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-size: 10.6667px;"&gt;BILL_MONTH = {$(=If(GetSelectedCount(BILL_MONTH) = 0, &lt;SPAN style="color: #0000ff;"&gt;date(addmonths(today(),-1),'YYYY')&lt;/SPAN&gt;, Concat(BILL_MONTH, ',')))}&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-size: 10.6667px;"&gt;&lt;SPAN style="color: #0000ff;"&gt;What I need here is a less-than-statement ('&amp;lt;=').&lt;/SPAN&gt; &lt;/STRONG&gt;I didn't figure it out yet. Maybe u guys have an idea or a less complex proposal than mine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;STRONG style="font-size: 10.6667px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Thank you in advance!&lt;STRONG style="font-size: 10.6667px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2018 09:09:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-and-clearness/m-p/28219#M608370</guid>
      <dc:creator>spcon2016</dc:creator>
      <dc:date>2018-03-29T09:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: Performance and clearness</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-and-clearness/m-p/28220#M608371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you could use something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({1&amp;lt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATATYPE={'ACTUAL'},&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BILL_YEAR = &lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;$(=pick(ceil(getselectedcount(BILL_YEAR) / 100) + 1, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '{"&amp;lt;' &amp;amp; num(month(today())) &amp;amp; '"}', 'p(BILL_YEAR)'))&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BILL_MONTH = &lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;$(=pick(ceil(getselectedcount(BILL_MONTH) / 12) + 1, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '{"&amp;lt;' &amp;amp; num(month(today())) &amp;amp; '"}', 'p(BILL_MONTH)')) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&amp;gt;} SALES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;which avoids the doubled calculation through the if-loop (all branches of an if-loop will always be calculated) and further the concat-aggregations within set analysis which without a DISTINCT might return a very large data-set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2018 11:07:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-and-clearness/m-p/28220#M608371</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-03-29T11:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: Performance and clearness</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-and-clearness/m-p/28221#M608372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your approach is pretty good regarding to the performance. We need to change somenthing little to make it perfect. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The requirement is if the use doesn't make any selections: &lt;/P&gt;&lt;P&gt;BILL_YEAR = year(today())&lt;/P&gt;&lt;P&gt;BILL_MONTH &amp;lt; month(today()) &lt;/P&gt;&lt;P&gt;So far, so good. &lt;/P&gt;&lt;P&gt;Just assuming the user selects last year the function is still showing &amp;lt;month(today()) but for the selected year (e.g. last year). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to go with this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;SUM({1&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATATYPE={'ACTUAL'},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BILL_YEAR = $(=pick(ceil(getselectedcount(BILL_YEAR) / 100) + 1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '{"' &amp;amp; year(today()) &amp;amp; '"}', 'p(BILL_YEAR)')),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BILL_MONTH = $(=pick(ceil(getselectedcount(BILL_YEAR) / 12) + 1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '{"&amp;lt;' &amp;amp; num(month(today())) &amp;amp; '"}', 'p(BILL_MONTH)'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;} SALES)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As you can see I've changed the second getselectedcount into YEAR. Now, it&amp;nbsp; shows the entire year if no year was selected. But it ignores any month selection for the current year as long as the user doesn't select a year. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="dsfsdf.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/198163_dsfsdf.png" style="height: auto;" /&gt; &lt;/P&gt;&lt;P&gt;Any idea to fix this? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2018 19:10:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-and-clearness/m-p/28221#M608372</guid>
      <dc:creator>spcon2016</dc:creator>
      <dc:date>2018-04-02T19:10:58Z</dc:date>
    </item>
    <item>
      <title>Re: Performance and clearness</title>
      <link>https://community.qlik.com/t5/QlikView/Performance-and-clearness/m-p/28222#M608373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Marcus, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this one worked for me: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;SUM({1&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATATYPE={'ACTUAL'},&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BILL_YEAR = $(=pick(ceil(getselectedcount(BILL_YEAR) / 100) + 1,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '{"' &amp;amp; year(today()) &amp;amp; '"}', 'p(BILL_YEAR)')),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; BILL_MONTH = $(=pick(ceil(getselectedcount(BILL_MONTH) / 12) + 1 + getselectedcount(BILL_YEAR),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '{"&amp;lt;' &amp;amp; num(month(today())) &amp;amp; '"}', 'p(BILL_MONTH)','p(BILL_MONTH)'))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;} SALES)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Apr 2018 19:35:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Performance-and-clearness/m-p/28222#M608373</guid>
      <dc:creator>spcon2016</dc:creator>
      <dc:date>2018-04-02T19:35:29Z</dc:date>
    </item>
  </channel>
</rss>

