<?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: Convert This IF Statement to Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345799#M414115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My expression does not have Distinct after the count. Did you try it adding the 'Distinct'?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Apr 2017 20:16:54 GMT</pubDate>
    <dc:creator>CarlosAMonroy</dc:creator>
    <dc:date>2017-04-19T20:16:54Z</dc:date>
    <item>
      <title>Convert This IF Statement to Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345796#M414112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello. Can someone please tell me how to convert this IF statement expression to a set analysis expression? I've tried many different times, but am still unable to find one that works. Much appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=COUNT(DISTINCT(IF(BegDateOfOperation &amp;lt;= (CalendarDate) and EndDateOfOperation &amp;gt; $(vDateToday), %PropertyKey)))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 19:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345796#M414112</guid>
      <dc:creator>alexandergrando</dc:creator>
      <dc:date>2017-04-19T19:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Convert This IF Statement to Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345797#M414113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=count({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;BegDateOfOperation &lt;/SPAN&gt;={"&amp;lt;=$(=Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;CalendarDate&lt;/SPAN&gt;),'MM/DD/YY')"}, EndDateOfOperation &lt;SPAN style="font-size: 13.3333px;"&gt;={"&amp;gt;$(=Date(Today()),'MM/DD/YY')&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;"}&lt;/SPAN&gt;&amp;gt;}&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;%PropertyKey&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;Carlos M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 19:42:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345797#M414113</guid>
      <dc:creator>CarlosAMonroy</dc:creator>
      <dc:date>2017-04-19T19:42:32Z</dc:date>
    </item>
    <item>
      <title>Re: Convert This IF Statement to Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345798#M414114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Carlos,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your expression, but it seems like it is incorrect due to different results in my line chart. It looks like your expression is COUNTING all of the %PropertyKey regardless of date. I have attached some screenshots as reference:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF Statement:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="IF Statement.PNG" class="jive-image image-1" src="/legacyfs/online/160573_IF Statement.PNG" style="height: 326px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Set Analysis.PNG" class="jive-image image-2" src="/legacyfs/online/160574_Set Analysis.PNG" style="height: 327px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 20:10:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345798#M414114</guid>
      <dc:creator>alexandergrando</dc:creator>
      <dc:date>2017-04-19T20:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: Convert This IF Statement to Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345799#M414115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My expression does not have Distinct after the count. Did you try it adding the 'Distinct'?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 20:16:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345799#M414115</guid>
      <dc:creator>CarlosAMonroy</dc:creator>
      <dc:date>2017-04-19T20:16:54Z</dc:date>
    </item>
    <item>
      <title>Re: Convert This IF Statement to Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345800#M414116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=COUNT({$&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;%PropertyKey&lt;/SPAN&gt;={"=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;BegDateOfOperation &amp;lt;= CalendarDate and EndDateOfOperation &amp;gt; $(vDateToday)&lt;/SPAN&gt;"}&amp;gt;} DISTINCT %PropertyKey)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 20:17:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345800#M414116</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2017-04-19T20:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: Convert This IF Statement to Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345801#M414117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alexander,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;unfortunately, this IF statement cannot be easily converted to Set Analysis, because Set Analysis cannot be sensitive to your Chart Dimensions - it is only calculated once, before the chart is calculated. You want you Set Analysis condition to be sensitive to the Date field, and you want your dimension to be Date-driven (Year and Month are nothing else but Date attributes...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, you can't convert your IF into Set Analysis directly. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can, however, implement a solution known as "As of Date Table" and calculate certain conditional flags in the script that would make your condition more "static" and independent from the Date field. You can read about the As Of Date technique from many sources, including my blog:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.naturalsynergies.com/q-tip-4-how-to-use-as-of-date-table/" title="http://www.naturalsynergies.com/q-tip-4-how-to-use-as-of-date-table/"&gt;QlikView Blog Q-Tip #4 How to Use "As of Date" table | Natural Synergies&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can also learn about it from my book&lt;A href="https://www.amazon.com/gp/product/1118949552/ref=as_li_tl?ie=UTF8&amp;amp;camp=1789&amp;amp;creative=9325&amp;amp;creativeASIN=1118949552&amp;amp;linkCode=as2&amp;amp;tag=natursyner0f-20&amp;amp;linkId=098202df27917ab9836332cf063c51f5"&gt; QlikView Your Business&lt;/A&gt;. We also teach this topic, along with many other advanced data modeling techniques, at the &lt;A href="http://masterssummit.com/"&gt;Masters Summit for Qlik&lt;/A&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 20:25:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345801#M414117</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2017-04-19T20:25:56Z</dc:date>
    </item>
    <item>
      <title>Re: Convert This IF Statement to Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345802#M414118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried but a "No data to display" label appears instead of the chart. Can you retype the expression with DISTINCT so I am sure I got it right, please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 20:26:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345802#M414118</guid>
      <dc:creator>alexandergrando</dc:creator>
      <dc:date>2017-04-19T20:26:13Z</dc:date>
    </item>
    <item>
      <title>Re: Convert This IF Statement to Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345803#M414119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This also did not work &lt;SPAN style="font-size: 13.3333px;"&gt;with a "No data to display" label appears instead of the chart. I think &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Oleg Troyansky&lt;/SPAN&gt;&lt;/SPAN&gt; is right below.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 20:28:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345803#M414119</guid>
      <dc:creator>alexandergrando</dc:creator>
      <dc:date>2017-04-19T20:28:42Z</dc:date>
    </item>
    <item>
      <title>Re: Convert This IF Statement to Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345804#M414120</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;please post a sample application to test with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Apr 2017 20:33:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Convert-This-IF-Statement-to-Set-Analysis/m-p/1345804#M414120</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2017-04-19T20:33:19Z</dc:date>
    </item>
  </channel>
</rss>

