<?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: YearMonth if statement in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767522#M454383</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/131230"&gt;@dhgaimez&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try with variable for this .&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;vpast6Month =&amp;nbsp;&lt;SPAN&gt;Date(AddMonths(max(YearMonth), -6),'YYYY-MM')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(YearMonth = '$(vpast6Month)',0,1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope it helps&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 10 Dec 2020 06:41:13 GMT</pubDate>
    <dc:creator>MayilVahanan</dc:creator>
    <dc:date>2020-12-10T06:41:13Z</dc:date>
    <item>
      <title>YearMonth if statement</title>
      <link>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767405#M454370</link>
      <description>&lt;P&gt;Hey all,&lt;BR /&gt;&lt;BR /&gt;I am trying to use an if statement using YearMonth in relation to a calculated value and cannot get it working.&lt;BR /&gt;&lt;BR /&gt;This is working&lt;BR /&gt;if(YearMonth = '2020-02',0,1)&lt;BR /&gt;&lt;BR /&gt;Trying to get something like this to work.&amp;nbsp;&lt;BR /&gt;if(YearMonth =&amp;nbsp;Date(AddMonths(max(YearMonth), -6),'YYYY-MM'), 0, 1)&lt;BR /&gt;&lt;BR /&gt;Date(AddMonths(max(YearMonth), -6),'YYYY-MM') outputs 2020-02&lt;BR /&gt;&lt;BR /&gt;Can't figure out why this wouldn't work. Any help is appreciated!&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 16:33:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767405#M454370</guid>
      <dc:creator>dhgaimez</dc:creator>
      <dc:date>2020-12-09T16:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: YearMonth if statement</title>
      <link>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767453#M454373</link>
      <description>&lt;P&gt;it looks like you are comparing two different types, make both dates in your compare&lt;/P&gt;</description>
      <pubDate>Wed, 09 Dec 2020 18:56:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767453#M454373</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-09T18:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: YearMonth if statement</title>
      <link>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767522#M454383</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/131230"&gt;@dhgaimez&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try with variable for this .&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex:&lt;/P&gt;&lt;P&gt;vpast6Month =&amp;nbsp;&lt;SPAN&gt;Date(AddMonths(max(YearMonth), -6),'YYYY-MM')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(YearMonth = '$(vpast6Month)',0,1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope it helps&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 06:41:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767522#M454383</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2020-12-10T06:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: YearMonth if statement</title>
      <link>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767527#M454384</link>
      <description>&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(YearMonth = text(Date(AddMonths(max(YearMonth), -6),'YYYY-MM')), 0, 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;-Pradosh&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 07:13:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767527#M454384</guid>
      <dc:creator>pradosh_thakur</dc:creator>
      <dc:date>2020-12-10T07:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: YearMonth if statement</title>
      <link>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767679#M454391</link>
      <description>&lt;P&gt;as i said both side of the equation should have same data type convert both to date:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if(date(YearMonth&amp;amp;'-01') = AddMonths(date(max(YearMonth)&amp;amp;'-01'), -6), 0, 1)&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;you dont need the formatting to YYYY-MM&lt;/P&gt;</description>
      <pubDate>Thu, 10 Dec 2020 16:11:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YearMonth-if-statement/m-p/1767679#M454391</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-10T16:11:38Z</dc:date>
    </item>
  </channel>
</rss>

