<?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: If condition within Set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/If-condition-within-Set-analysis/m-p/846459#M1009979</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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Month='January',&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count({&amp;lt;closed_year={"$(=Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date#(Year(today()),'YYYY')-1&lt;/SPAN&gt;,'YYYY'))"}&amp;gt;} DISTINCT ID)&lt;/SPAN&gt;,&lt;/SPAN&gt;Count({&amp;lt;closed_year={"$(=Date(Date#(Year(today()),'YYYY'),'YYYY'))"}&amp;gt;} DISTINCT ID) )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Apr 2015 09:12:05 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-04-29T09:12:05Z</dc:date>
    <item>
      <title>If condition within Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-within-Set-analysis/m-p/846457#M1009977</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;we face the following problem:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;closed_year={"$(=Date(Date#(Year(today()),'YYYY'),'YYYY'))"}&amp;gt;} DISTINCT ID) is working fine, but we need to add an if-statement within the set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If Month=January it should be&amp;nbsp; (Date#(Year(today()),'YYYY')-1 ==&amp;gt; the year before; but how does the syntax work?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 09:03:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-within-Set-analysis/m-p/846457#M1009977</guid>
      <dc:creator />
      <dc:date>2015-04-29T09:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: If condition within Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-within-Set-analysis/m-p/846458#M1009978</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Corinna,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would recommend creating a variable which does the if statement and results in the correct end value. You can then use that variable in your set analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;something like&lt;/P&gt;&lt;P&gt;create vDate variable&lt;/P&gt;&lt;P&gt;=If(Month(today())='Jan',Date#(Year(today()),'YYYY')-1, Date#(Year(today()),'YYYY'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Count({&amp;lt;closed_year={"$(vDate"}&amp;gt;} DISTINCT ID)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;just keeps your expression cleaner and means you can reuse the same variable for other expressions&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 09:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-within-Set-analysis/m-p/846458#M1009978</guid>
      <dc:creator />
      <dc:date>2015-04-29T09:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: If condition within Set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/If-condition-within-Set-analysis/m-p/846459#M1009979</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;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;if(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Month='January',&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count({&amp;lt;closed_year={"$(=Date(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Date#(Year(today()),'YYYY')-1&lt;/SPAN&gt;,'YYYY'))"}&amp;gt;} DISTINCT ID)&lt;/SPAN&gt;,&lt;/SPAN&gt;Count({&amp;lt;closed_year={"$(=Date(Date#(Year(today()),'YYYY'),'YYYY'))"}&amp;gt;} DISTINCT ID) )&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2015 09:12:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/If-condition-within-Set-analysis/m-p/846459#M1009979</guid>
      <dc:creator />
      <dc:date>2015-04-29T09:12:05Z</dc:date>
    </item>
  </channel>
</rss>

