<?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: How to assign a flag in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578950#M456748</link>
    <description>Super .....Thanks It Worked</description>
    <pubDate>Fri, 10 May 2019 12:13:01 GMT</pubDate>
    <dc:creator>kunkumnaveen</dc:creator>
    <dc:date>2019-05-10T12:13:01Z</dc:date>
    <item>
      <title>How to assign a flag</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578879#M456743</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I Need to set a Flag 1 for all the Years and Quarters which are less then Q22019.&lt;/P&gt;&lt;P&gt;I tried below thing but its not working&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if(QuarterYear_New&amp;lt;=YearQuarter,1,0) as Year_Flag;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11837iAC9E50B303851CB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;So for all the QuarterYears below Q22019 should be assign a Flag 1 less 0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Below is the Script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;YearQuarter:&lt;BR /&gt;load *,&lt;BR /&gt;if(QuarterYear_New&amp;lt;=YearQuarter,1,0) as Year_Flag;&lt;/P&gt;&lt;P&gt;load *,&lt;BR /&gt;PurgeChar(QuarterYear,' ') as QuarterYear_New,&lt;BR /&gt;'Q' &amp;amp; Ceil(Month(Date#(today(), 'M/D/YYYY'))/3)&amp;amp;Year(Date#(today(), 'M/D/YYYY')) as YearQuarter&lt;/P&gt;&lt;P&gt;Resident QuarterYear;&lt;BR /&gt;Drop Table QuarterYear;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 10:13:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578879#M456743</guid>
      <dc:creator>kunkumnaveen</dc:creator>
      <dc:date>2019-05-10T10:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a flag</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578891#M456744</link>
      <description>&lt;P&gt;Hi Naveen,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try below logic&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load *,&lt;/P&gt;&lt;P&gt;if(right(QuarterYear_New,4)&amp;lt;=right(YearQuarter,4),1,0) as Year_Flag;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Sultan&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 10:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578891#M456744</guid>
      <dc:creator>sultanam</dc:creator>
      <dc:date>2019-05-10T10:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a flag</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578903#M456745</link>
      <description>&lt;P&gt;HI , your expression works only at Year Level ignoring Quarters , I Mean as shown below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture.PNG" style="width: 399px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/11840i844F6026D598587A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Q32019 and Q42019 it suppose to be 0 instead of 1 because Q3 and Q4 is greater than Q2&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 11:14:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578903#M456745</guid>
      <dc:creator>kunkumnaveen</dc:creator>
      <dc:date>2019-05-10T11:14:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a flag</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578910#M456746</link>
      <description>&lt;P&gt;Hello All , Any Suggestion &amp;nbsp;for achieving above requirement plz&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 11:23:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578910#M456746</guid>
      <dc:creator>kunkumnaveen</dc:creator>
      <dc:date>2019-05-10T11:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a flag</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578944#M456747</link>
      <description>&lt;P&gt;Try this one once&lt;BR /&gt;&lt;BR /&gt;if(Right(QuarterYear_New,4)&amp;gt;Right(YearQuarter,4) or (left(PurgeChar(QuarterYear_New,'Q'),1)&amp;gt;left(PurgeChar(YearQuarter,'Q'),1) and Right(QuarterYear_New,4)&amp;gt;=Right(YearQuarter,4)),0,1) as Year_Flag;&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2019 12:08:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578944#M456747</guid>
      <dc:creator>sultanam</dc:creator>
      <dc:date>2019-05-10T12:08:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign a flag</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578950#M456748</link>
      <description>Super .....Thanks It Worked</description>
      <pubDate>Fri, 10 May 2019 12:13:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-assign-a-flag/m-p/1578950#M456748</guid>
      <dc:creator>kunkumnaveen</dc:creator>
      <dc:date>2019-05-10T12:13:01Z</dc:date>
    </item>
  </channel>
</rss>

