<?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: Flagging most recent date with an IF condition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Flagging-most-recent-date-with-an-IF-condition/m-p/1835268#M1214849</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/149325"&gt;@Jonathan_Svoboda&lt;/a&gt;&amp;nbsp;, please check something like this :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data:&lt;BR /&gt;Load&lt;BR /&gt;"Training Code",&lt;BR /&gt;"Training Enrollment Date Key",&lt;BR /&gt;"Training Product"&lt;BR /&gt;FROM [xxx.qvd];&lt;/P&gt;&lt;P&gt;left join&lt;BR /&gt;Load&lt;BR /&gt;"Training Code",&lt;BR /&gt;max("Training Enrollment Date Key") as "Training Enrollment Date Key",&lt;/P&gt;&lt;P&gt;'&lt;SPAN&gt;Most Recent Enrollment'&amp;nbsp; as flag&lt;/SPAN&gt;&lt;BR /&gt;Resident Data&lt;BR /&gt;Where "Training Product" = 'New'&lt;BR /&gt;group by&lt;BR /&gt;"Training Code";&lt;/P&gt;</description>
    <pubDate>Fri, 10 Sep 2021 16:59:47 GMT</pubDate>
    <dc:creator>QFabian</dc:creator>
    <dc:date>2021-09-10T16:59:47Z</dc:date>
    <item>
      <title>Flagging most recent date with an IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Flagging-most-recent-date-with-an-IF-condition/m-p/1835266#M1214848</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create a field that flags the most recent training enrollment date only if the product equals 'new". I managed to create the flag field without an issue but I cannot seem to find a way to add the training product = new condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;"Training Code",&lt;BR /&gt;max("Training Enrollment Date Key") as "Training Enrollment Date Key",&lt;BR /&gt;1 as "Most Recent Enrollment"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FROM [xxx.qvd]&lt;/P&gt;&lt;P&gt;Group By "Training Code";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The problem is, when I try to add an if statement to include the condition I want, I get an error. See below for what I tried to do, if someone could tell me where I went wrong here that would be appreciated.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Left Join&lt;/P&gt;&lt;P&gt;LOAD&lt;BR /&gt;"Training Code",&lt;BR /&gt;max("Training Enrollment Date Key") as "Training Enrollment Date Key",&lt;BR /&gt;if("Training Product" = 'New',1,0) as "Most Recent Enrollment"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;FROM [xxx.qvd]&lt;/P&gt;&lt;P&gt;Group By "Training Code";&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 16:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flagging-most-recent-date-with-an-IF-condition/m-p/1835266#M1214848</guid>
      <dc:creator>Jonathan_Svoboda</dc:creator>
      <dc:date>2021-09-10T16:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: Flagging most recent date with an IF condition</title>
      <link>https://community.qlik.com/t5/QlikView/Flagging-most-recent-date-with-an-IF-condition/m-p/1835268#M1214849</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/149325"&gt;@Jonathan_Svoboda&lt;/a&gt;&amp;nbsp;, please check something like this :&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Data:&lt;BR /&gt;Load&lt;BR /&gt;"Training Code",&lt;BR /&gt;"Training Enrollment Date Key",&lt;BR /&gt;"Training Product"&lt;BR /&gt;FROM [xxx.qvd];&lt;/P&gt;&lt;P&gt;left join&lt;BR /&gt;Load&lt;BR /&gt;"Training Code",&lt;BR /&gt;max("Training Enrollment Date Key") as "Training Enrollment Date Key",&lt;/P&gt;&lt;P&gt;'&lt;SPAN&gt;Most Recent Enrollment'&amp;nbsp; as flag&lt;/SPAN&gt;&lt;BR /&gt;Resident Data&lt;BR /&gt;Where "Training Product" = 'New'&lt;BR /&gt;group by&lt;BR /&gt;"Training Code";&lt;/P&gt;</description>
      <pubDate>Fri, 10 Sep 2021 16:59:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Flagging-most-recent-date-with-an-IF-condition/m-p/1835268#M1214849</guid>
      <dc:creator>QFabian</dc:creator>
      <dc:date>2021-09-10T16:59:47Z</dc:date>
    </item>
  </channel>
</rss>

