<?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 statement with IF conditions? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750425#M267668</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made it a bit complicated to understand. I redid the original post. Could you please take a look?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Jan 2015 20:43:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-07T20:43:42Z</dc:date>
    <item>
      <title>IF statement with IF conditions?</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750421#M267664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made it to complicated. So let me try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="ruby" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_14206631786284028" jivemacro_uid="_14206631786284028" modifiedtitle="true"&gt;
&lt;P&gt;If(MONTH(Today(1)) = 'Jan', &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(Year(OrderingPrescriber_RevenueDate) = (Year(Yearstart( Today( ) ))-2)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Year(Today(1))-2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,Year(Today(1))-1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(Year(OrderingPrescriber_RevenueDate) = (Year(Yearstart( Today( ) ))-1)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'STLY'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,'YTD'))&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if the current month is Jan I want to have it display 2013 and 2014 but if the current month is not Jan, we will consider it the current years data and we want it to display STLY and YTD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 16:48:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750421#M267664</guid>
      <dc:creator />
      <dc:date>2015-01-07T16:48:01Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement with IF conditions?</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750422#M267665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Shouldn't the second IF test be something like this (pseudo code) ?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;IF ((Year(OrderDate) = Year(Today()) -1) &lt;EM style="text-decoration: underline;"&gt;and (Month(OrderDate) = 12)&lt;/EM&gt;, 1, 0) , ...&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 18:03:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750422#M267665</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2015-01-07T18:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement with IF conditions?</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750423#M267666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am a little bit confused on exactly what you are doing, but you can also use the InYearToDate() function as well to determine if a date is In the year to date. If you pass the function a -1, it will tell you if the date was in Last year's year to date (using the current date). I am not sure if that will help you but wanted to throw it out there. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 19:05:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750423#M267666</guid>
      <dc:creator>cspencer3</dc:creator>
      <dc:date>2015-01-07T19:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement with IF conditions?</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750424#M267667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This post might help with calculating YTD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/message/469066#469066"&gt;http://community.qlik.com/message/469066&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 19:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750424#M267667</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2015-01-07T19:18:26Z</dc:date>
    </item>
    <item>
      <title>Re: IF statement with IF conditions?</title>
      <link>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750425#M267668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I made it a bit complicated to understand. I redid the original post. Could you please take a look?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Jan 2015 20:43:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-statement-with-IF-conditions/m-p/750425#M267668</guid>
      <dc:creator />
      <dc:date>2015-01-07T20:43:42Z</dc:date>
    </item>
  </channel>
</rss>

