<?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 Adding a flag to the earliest action for each case in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Adding-a-flag-to-the-earliest-action-for-each-case/m-p/716144#M257525</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;Wondering if you can help, i have some data in the format of the table below. I need to add a flag (flag must be a 1 not a date) to the earliest closure record of each case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone think of the best approach? I am adding the flag through a resident load which is joined back to the original table. I'm not sure whether i need to write a loop to look at all records under each case id, if so i'd appreciate some guidence on that. Thank you in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 100%; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Case ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Status&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Status Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Closed&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/02/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Closed&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/03/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Closed&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;03/03/2014&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Aug 2014 14:53:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-20T14:53:30Z</dc:date>
    <item>
      <title>Adding a flag to the earliest action for each case</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-flag-to-the-earliest-action-for-each-case/m-p/716144#M257525</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;Wondering if you can help, i have some data in the format of the table below. I need to add a flag (flag must be a 1 not a date) to the earliest closure record of each case&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone think of the best approach? I am adding the flag through a resident load which is joined back to the original table. I'm not sure whether i need to write a loop to look at all records under each case id, if so i'd appreciate some guidence on that. Thank you in advance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="BORDER-BOTTOM: #000000 1px solid; BORDER-LEFT: #000000 1px solid; WIDTH: 100%; BORDER-TOP: #000000 1px solid; BORDER-RIGHT: #000000 1px solid;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Case ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Status&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;"&gt;&lt;STRONG&gt;Status Date&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Closed&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/02/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Closed&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;01/03/2014&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Closed&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;03/03/2014&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2014 14:53:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-flag-to-the-earliest-action-for-each-case/m-p/716144#M257525</guid>
      <dc:creator />
      <dc:date>2014-08-20T14:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to the earliest action for each case</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-flag-to-the-earliest-action-for-each-case/m-p/716145#M257526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I recon you are on the right track Ashley.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Worked example should clarify / confirm - see attached data &amp;amp; QVW. Note that my data will also show that should there be multipe records for a single case with the same Close Date then both will be flagged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know how you get on.&lt;/P&gt;&lt;P&gt;Geoff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2014 16:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-flag-to-the-earliest-action-for-each-case/m-p/716145#M257526</guid>
      <dc:creator>gmarshall</dc:creator>
      <dc:date>2014-08-20T16:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a flag to the earliest action for each case</title>
      <link>https://community.qlik.com/t5/QlikView/Adding-a-flag-to-the-earliest-action-for-each-case/m-p/716146#M257527</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;one solution:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_130144_Pic1.JPG.jpg" class="jive-image" src="https://community.qlik.com/legacyfs/online/64873_QlikCommunity_Thread_130144_Pic1.JPG.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="_jivemacro_uid_14085620226349753 jive_text_macro jive_macro_code" jivemacro_uid="_14085620226349753"&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;LOAD *&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FROM [&lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2051" data-containertype="14" data-objectid="130144" data-objecttype="1" href="http://community.qlik.com/thread/130144"&gt;http://community.qlik.com/thread/130144&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;(html, codepage is 1252, embedded labels, table is @1);&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (table1)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD *, 1 as flag;&lt;/P&gt;
&lt;P&gt;LOAD [Case ID], Status, Min([Status Date]) as [Status Date]&lt;/P&gt;
&lt;P&gt;Resident table1&lt;/P&gt;
&lt;P&gt;Where Status = 'Closed'&lt;/P&gt;
&lt;P&gt;Group By [Case ID], Status;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Marco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Aug 2014 18:29:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Adding-a-flag-to-the-earliest-action-for-each-case/m-p/716146#M257527</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2014-08-20T18:29:54Z</dc:date>
    </item>
  </channel>
</rss>

