<?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: Set Analysis inside if condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-if-condition/m-p/1291765#M846311</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW you can drop the IF function call (causes very bad performance on large data sets) by including the match inside the set analysis spec. Like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sts_application = {'A','W','C','U'}&lt;/SPAN&gt;, new_create_date = {"$(='&amp;gt;=' &amp;amp; Date(Weekstart(Max(new_create_date)), 'M/D/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; Date((Max(new_create_date)), 'M/D/YYYY'))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&amp;gt;}.&lt;/SPAN&gt;DISTINCT&amp;nbsp; ssn)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 28 Mar 2017 11:10:24 GMT</pubDate>
    <dc:creator>Peter_Cammaert</dc:creator>
    <dc:date>2017-03-28T11:10:24Z</dc:date>
    <item>
      <title>Set Analysis inside if condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-if-condition/m-p/1291763#M846309</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;&lt;STRONG&gt;I have the following expression:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;count(DISTINCT if(match (sts_application,'A','W','C','U'),ssn))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&lt;STRONG&gt; want to use set analysis inside the if&lt;/STRONG&gt; to get Week to date ssn.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set analysis I have is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&amp;lt;new_create_date = {"$(='&amp;gt;=' &amp;amp; Date(Weekstart(Max(new_create_date)), 'M/D/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; Date((Max(new_create_date)), 'M/D/YYYY'))"&lt;SPAN style="font-size: 10pt;"&gt;}&amp;gt;}.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where shall I use the set analysis inside the If statement?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-if-condition/m-p/1291763#M846309</guid>
      <dc:creator>_armoco_</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis inside if condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-if-condition/m-p/1291764#M846310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is only one aggregation function; so you can only put the set analysis specification after the &lt;SPAN style="font-family: 'courier new', courier;"&gt;=count(&lt;/SPAN&gt; part...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 11:07:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-if-condition/m-p/1291764#M846310</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-03-28T11:07:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis inside if condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-if-condition/m-p/1291765#M846311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;BTW you can drop the IF function call (causes very bad performance on large data sets) by including the match inside the set analysis spec. Like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;count(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;{&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sts_application = {'A','W','C','U'}&lt;/SPAN&gt;, new_create_date = {"$(='&amp;gt;=' &amp;amp; Date(Weekstart(Max(new_create_date)), 'M/D/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; Date((Max(new_create_date)), 'M/D/YYYY'))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}&amp;gt;}.&lt;/SPAN&gt;DISTINCT&amp;nbsp; ssn)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 11:10:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-if-condition/m-p/1291765#M846311</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-03-28T11:10:24Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis inside if condition</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-if-condition/m-p/1291766#M846312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this,&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(match (sts_application,'A','W','C','U'),Count({&amp;lt;{&amp;lt;new_create_date = {"$(='&amp;gt;=' &amp;amp; Date(Weekstart(Max(new_create_date)), 'M/D/YYYY') &amp;amp; '&amp;lt;=' &amp;amp; Date((Max(new_create_date)), 'M/D/YYYY'))"&lt;SPAN style="font-size: 10pt;"&gt;}&amp;gt;}.&lt;/SPAN&gt;&amp;gt;}distinct SSN),'Unknown'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if the match condition&amp;nbsp; satisfies it'll display value using setanalysis else it'll show Unknown value&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 11:14:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-inside-if-condition/m-p/1291766#M846312</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-03-28T11:14:54Z</dc:date>
    </item>
  </channel>
</rss>

