<?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: Check which value is the Min and Max in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863775#M654865</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But my original script worked for you, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you upload your QVW or a sample file that demonstrates your issue?&lt;/P&gt;&lt;P&gt;(Or a sample of your input data)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Jun 2015 18:59:36 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2015-06-19T18:59:36Z</dc:date>
    <item>
      <title>Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863770#M654860</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;I would like to attach a field to my data, to determined which line has the max value or min value for the combination of ID+Activity in my Script Load:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 199px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" width="64"&gt;ID&lt;/TD&gt;&lt;TD width="64"&gt;Activity&lt;/TD&gt;&lt;TD width="71"&gt;Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;01/01/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;02/01/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;03/01/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;04/01/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;05/01/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;06/01/2015&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;3&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;07/01/2015&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result could be something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 263px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD height="17" width="64"&gt;ID&lt;/TD&gt;&lt;TD width="64"&gt;Activity&lt;/TD&gt;&lt;TD width="71"&gt;Date&lt;/TD&gt;&lt;TD width="64"&gt;Rank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;01/01/2015&lt;/TD&gt;&lt;TD&gt;Min&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;02/01/2015&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;03/01/2015&lt;/TD&gt;&lt;TD&gt;Max&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;1&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;04/01/2015&lt;/TD&gt;&lt;TD&gt;Max/Min&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;05/01/2015&lt;/TD&gt;&lt;TD&gt;Min&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;2&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;06/01/2015&lt;/TD&gt;&lt;TD&gt;Max&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="17"&gt;3&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;TD align="right" class="xl65"&gt;07/01/2015&lt;/TD&gt;&lt;TD&gt;Max/Min&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried some combination of max and min, but did not get results like this one that i was expecting.&lt;/P&gt;&lt;P&gt;BR//Marcelo Fonseca&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 17:32:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863770#M654860</guid>
      <dc:creator />
      <dc:date>2015-06-19T17:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863771#M654861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14347356057934298" jivemacro_uid="_14347356057934298"&gt;
&lt;P&gt;Set DateFormat = 'DD/MM/YYYY';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;INPUT:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;ID, Activity, Date&lt;/P&gt;
&lt;P&gt;1, A, 01/01/2015&lt;/P&gt;
&lt;P&gt;1, A, 02/01/2015&lt;/P&gt;
&lt;P&gt;1, A, 03/01/2015&lt;/P&gt;
&lt;P&gt;1, B, 04/01/2015&lt;/P&gt;
&lt;P&gt;2, B, 05/01/2015&lt;/P&gt;
&lt;P&gt;2, B, 06/01/2015&lt;/P&gt;
&lt;P&gt;3, C, 07/01/2015&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;TMP:&lt;/P&gt;
&lt;P&gt;LOAD ID,Activity,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; min(Date) as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Min' as Flag&lt;/P&gt;
&lt;P&gt;RESIDENT INPUT&lt;/P&gt;
&lt;P&gt;GROUP BY ID, Activity; &lt;/P&gt;
&lt;P&gt;LOAD ID, Activity,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Max(Date) as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Max' as Flag&lt;/P&gt;
&lt;P&gt;RESIDENT INPUT&lt;/P&gt;
&lt;P&gt;GROUP BY ID, Activity;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LEFT JOIN (INPUT)&lt;/P&gt;
&lt;P&gt;LOAD ID, Activity, Date, concat(Flag,'/') as Flag&lt;/P&gt;
&lt;P&gt;RESIDENT TMP&lt;/P&gt;
&lt;P&gt;GROUP BY ID, Activity, Date;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE TMP;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 17:39:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863771#M654861</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-19T17:39:52Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863772#M654862</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see the attached file. I have used expression in chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 18:15:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863772#M654862</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-06-19T18:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863773#M654863</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14347393363415890" jivemacro_uid="_14347393363415890"&gt;
&lt;P&gt;DATASTEMP:&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [%Key field],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; StepAtividade,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; min(Data) as Data,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Primeiro' as StepAtividadeOrder&lt;/P&gt;
&lt;P&gt;Resident DATAS&lt;/P&gt;
&lt;P&gt;Group by [%Key field], StepAtividade;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [%Key field],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; StepAtividade,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; max(Data) as Data,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; 'Ultimo' as StepAtividadeOrder&lt;/P&gt;
&lt;P&gt;Resident DATAS&lt;/P&gt;
&lt;P&gt;Group by [%Key field], StepAtividade;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LEFT JOIN (DATAS)&lt;/P&gt;
&lt;P&gt;Load&lt;/P&gt;
&lt;P&gt;&amp;nbsp; [%Key field],&lt;/P&gt;
&lt;P&gt;&amp;nbsp; StepAtividade,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Data,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Concat(StepAtividadeOrder,'/') as StepAtividadeOrder&lt;/P&gt;
&lt;P&gt;Resident DATASTEMP&lt;/P&gt;
&lt;P&gt;Group by [%Key field], StepAtividade, Data;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Drop table DATASTEMP;&lt;/P&gt;

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the result was like this:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/90130_1.PNG" style="height: 247px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;It did not make the diference between&amp;nbsp; the Max and Min.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 18:45:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863773#M654863</guid>
      <dc:creator />
      <dc:date>2015-06-19T18:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863774#M654864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Kush, This worked very great, but one of the motives to ask this in the Script it is to filter in a ListBox. There is any way to add the results (Min, Max, Min/Max, N/A) in a list box?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 18:57:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863774#M654864</guid>
      <dc:creator />
      <dc:date>2015-06-19T18:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863775#M654865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But my original script worked for you, right?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you upload your QVW or a sample file that demonstrates your issue?&lt;/P&gt;&lt;P&gt;(Or a sample of your input data)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 18:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863775#M654865</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-19T18:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863776#M654866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please see the below screenshots where I handled it in the load script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-3" src="https://community.qlik.com/legacyfs/online/90131_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the data model with data:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture2.PNG" class="image-4 jive-image" src="https://community.qlik.com/legacyfs/online/90132_Capture2.PNG" style="height: 313px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;And finally, a table box and list box:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture3.PNG" class="image-5 jive-image" src="https://community.qlik.com/legacyfs/online/90133_Capture3.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 19:22:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863776#M654866</guid>
      <dc:creator>sinanozdemir</dc:creator>
      <dc:date>2015-06-19T19:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863777#M654867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I corrected somethings in my Script and now it is working. Thans very much! &lt;/P&gt;&lt;P&gt;My problem now it is that i have equal dates for the same ID and Activity, and the result it is like below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 256px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="font-style: inherit;" width="64"&gt;ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none; font-style: inherit;" width="64"&gt;Activity&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none; font-style: inherit;" width="71"&gt;Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left: none; font-style: inherit;" width="57"&gt;Rank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;01/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none;" width="57"&gt;&lt;STRONG&gt;Min&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;01/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;&lt;STRONG&gt;Min&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;03/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Max&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;04/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Max/Min&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;05/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Min&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;06/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Max&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;3&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;C&lt;/TD&gt;&lt;TD class="xl64" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;07/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Max/Min&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to have only one Min and one Max for each ID+Activity.&lt;/P&gt;&lt;P&gt;I Have another column that i can select who can be the Min, like below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 320px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="font-style: inherit;" width="64"&gt;ID&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; font-style: inherit;" width="64"&gt;Activity&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; font-style: inherit;" width="71"&gt;Date&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none; font-style: inherit;" width="57"&gt;Rank&lt;/TD&gt;&lt;TD class="xl65" style="border-left: none;" width="64"&gt;Source&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;01/01/2015&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none;" width="57"&gt;-&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;Executed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;01/01/2015&lt;/TD&gt;&lt;TD class="xl67" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;&lt;STRONG&gt;Min&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;&lt;STRONG&gt;Rework&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;03/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Max&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;Rework&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;04/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Max/Min&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;Executed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;05/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Min&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;Executed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;06/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Max&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;Rework&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top: none; font-style: inherit;" width="64"&gt;3&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="64"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="border-top: none; border-left: none; font-style: inherit;" width="71"&gt;07/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top: none; border-left: none; font-style: inherit;" width="57"&gt;Max/Min&lt;/TD&gt;&lt;TD class="xl68" style="border-top: none; border-left: none;"&gt;Executed&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 22:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863777#M654867</guid>
      <dc:creator />
      <dc:date>2015-06-19T22:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863778#M654868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;That worked too! Thans very much! &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;But same problem of the other solution:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;Now i have equal dates for the same ID and Activity, and the result it is like below:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 256px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="font-style: inherit;" width="64"&gt;ID&lt;/TD&gt;&lt;TD class="xl63" style="border-left-style: none; font-style: inherit;" width="64"&gt;Activity&lt;/TD&gt;&lt;TD class="xl63" style="border-left-style: none; font-style: inherit;" width="71"&gt;Date&lt;/TD&gt;&lt;TD class="xl63" style="border-left-style: none; font-style: inherit;" width="57"&gt;Rank&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="71"&gt;01/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; border-left-style: none;" width="57"&gt;&lt;STRONG&gt;Min&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="71"&gt;01/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="57"&gt;&lt;STRONG&gt;Min&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl64" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="71"&gt;03/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="57"&gt;Max&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl64" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="71"&gt;04/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="57"&gt;Max/Min&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl64" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="71"&gt;05/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="57"&gt;Min&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl64" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="71"&gt;06/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="57"&gt;Max&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl63" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;3&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="64"&gt;C&lt;/TD&gt;&lt;TD class="xl64" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="71"&gt;07/01/2015&lt;/TD&gt;&lt;TD class="xl63" style="border-top-style: none; border-left-style: none; font-style: inherit;" width="57"&gt;Max/Min&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I need to have only one Min and one Max for each ID+Activity.&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;I Have another column that i can select who can be the Min, like below:&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 320px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="font-style: inherit;" width="64"&gt;ID&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit;" width="64"&gt;Activity&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit;" width="71"&gt;Date&lt;/TD&gt;&lt;TD class="xl65" style="font-style: inherit;" width="57"&gt;Rank&lt;/TD&gt;&lt;TD class="xl65" width="64"&gt;Source&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top-style: none; font-style: inherit;" width="71"&gt;01/01/2015&lt;/TD&gt;&lt;TD class="xl67" style="border-top-style: none;" width="57"&gt;-&lt;/TD&gt;&lt;TD class="xl68" style="border-top-style: none;"&gt;Executed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top-style: none; font-style: inherit;" width="71"&gt;01/01/2015&lt;/TD&gt;&lt;TD class="xl67" style="border-top-style: none; font-style: inherit;" width="57"&gt;&lt;STRONG&gt;Min&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD class="xl68" style="border-top-style: none;"&gt;&lt;STRONG&gt;Rework&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="64"&gt;A&lt;/TD&gt;&lt;TD class="xl66" style="border-top-style: none; font-style: inherit;" width="71"&gt;03/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="57"&gt;Max&lt;/TD&gt;&lt;TD class="xl68" style="border-top-style: none;"&gt;Rework&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;1&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top-style: none; font-style: inherit;" width="71"&gt;04/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="57"&gt;Max/Min&lt;/TD&gt;&lt;TD class="xl68" style="border-top-style: none;"&gt;Executed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top-style: none; font-style: inherit;" width="71"&gt;05/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="57"&gt;Min&lt;/TD&gt;&lt;TD class="xl68" style="border-top-style: none;"&gt;Executed&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;2&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="64"&gt;B&lt;/TD&gt;&lt;TD class="xl66" style="border-top-style: none; font-style: inherit;" width="71"&gt;06/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="57"&gt;Max&lt;/TD&gt;&lt;TD class="xl68" style="border-top-style: none;"&gt;Rework&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" style="border-top-style: none; font-style: inherit;" width="64"&gt;3&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="64"&gt;C&lt;/TD&gt;&lt;TD class="xl66" style="border-top-style: none; font-style: inherit;" width="71"&gt;07/01/2015&lt;/TD&gt;&lt;TD class="xl65" style="border-top-style: none; font-style: inherit;" width="57"&gt;Max/Min&lt;/TD&gt;&lt;TD class="xl68" style="border-top-style: none;"&gt;Executed&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 22:05:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863778#M654868</guid>
      <dc:creator />
      <dc:date>2015-06-19T22:05:18Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863779#M654869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry, I don't understand. How do you tell which record should be flagged as 'Min' and which not?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 22:10:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863779#M654869</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-19T22:10:29Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863780#M654870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;By the column "Source". When this happen, the priority it is where is filled "Rework".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 22:14:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863780#M654870</guid>
      <dc:creator />
      <dc:date>2015-06-19T22:14:12Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863781#M654871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14347541848262409" jivemacro_uid="_14347541848262409" modifiedtitle="true"&gt;
&lt;P&gt;Set DateFormat = 'DD/MM/YYYY';&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;INPUT:&lt;/P&gt;
&lt;P&gt;LOAD * INLINE [&lt;/P&gt;
&lt;P&gt;ID, Activity, Date, Source&lt;/P&gt;
&lt;P&gt;1, A, 01/01/2015, Rework&lt;/P&gt;
&lt;P&gt;1, A, 01/01/2015, Executed&lt;/P&gt;
&lt;P&gt;1, A, 02/01/2015, Rework&lt;/P&gt;
&lt;P&gt;1, A, 03/01/2015, Executed&lt;/P&gt;
&lt;P&gt;1, B, 04/01/2015, Rework&lt;/P&gt;
&lt;P&gt;2, B, 05/01/2015, Rework&lt;/P&gt;
&lt;P&gt;2, B, 06/01/2015, Executed&lt;/P&gt;
&lt;P&gt;3, C, 07/01/2015, Executed&lt;/P&gt;
&lt;P&gt;];&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;TMP:&lt;/P&gt;
&lt;P&gt;LOAD ID,Activity, &lt;/P&gt;
&lt;P&gt;&amp;nbsp; FirstSortedValue(Source, Date -ord(left(Source,1))/1000) as Source,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(Date) as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; 'Min' as Flag&lt;/P&gt;
&lt;P&gt;RESIDENT INPUT&lt;/P&gt;
&lt;P&gt;GROUP BY ID, Activity;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LOAD ID, Activity, &lt;/P&gt;
&lt;P&gt;&amp;nbsp; FirstSortedValue(Source, -(Date - ord(left(Source,1))/1000)) as Source,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Max(Date) as Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; 'Max' as Flag&lt;/P&gt;
&lt;P&gt;RESIDENT INPUT&lt;/P&gt;
&lt;P&gt;GROUP BY ID, Activity;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;LEFT JOIN (INPUT)&lt;/P&gt;
&lt;P&gt;LOAD ID, Activity, only(Source) as Source, Date, concat(Flag,'/') as Flag&lt;/P&gt;
&lt;P&gt;RESIDENT TMP&lt;/P&gt;
&lt;P&gt;GROUP BY ID, Activity, Date;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP TABLE TMP;&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Jun 2015 22:49:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863781#M654871</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-06-19T22:49:59Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863782#M654872</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;another one (having the same issue I guess):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="QlikCommunity_Thread_169200_Pic1.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/90147_QlikCommunity_Thread_169200_Pic1.JPG" style="height: auto; width: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14347560721593624 jive_text_macro" jivemacro_uid="_14347560721593624"&gt;
&lt;P&gt;table1:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;LOAD * FROM [&lt;/SPAN&gt;&lt;A class="jive-link-thread-small" data-containerid="2061" data-containertype="14" data-objectid="169200" data-objecttype="1" href="https://community.qlik.com/thread/169200"&gt;https://community.qlik.com/thread/169200&lt;/A&gt;&lt;SPAN&gt;] (html, codepage is 1252, embedded labels, table is @1);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;tabRanks:&lt;/P&gt;
&lt;P&gt;CrossTable (Rank,Date,2)&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Date,Date) as Min,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; FirstSortedValue(Date,-Date) as Max&lt;/P&gt;
&lt;P&gt;Resident table1&lt;/P&gt;
&lt;P&gt;Group By ID, Activity;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Left Join (table1)&lt;/P&gt;
&lt;P&gt;LOAD ID,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Activity,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Concat(Rank,'/') as Rank&lt;/P&gt;
&lt;P&gt;Resident tabRanks&lt;/P&gt;
&lt;P&gt;Group By ID, Activity, Date;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;DROP Table tabRanks;&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>Fri, 19 Jun 2015 23:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863782#M654872</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2015-06-19T23:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Check which value is the Min and Max in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863783#M654873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please see the attached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Jun 2015 06:01:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Check-which-value-is-the-Min-and-Max-in-Load-Script/m-p/863783#M654873</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2015-06-20T06:01:33Z</dc:date>
    </item>
  </channel>
</rss>

