<?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 How to get minimum date in the granular level in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-get-minimum-date-in-the-granular-level/m-p/1102857#M631075</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem Like this:&lt;/P&gt;&lt;P&gt;I have a date field which has all the update date and I have to take the Minimum Date from this field in the granular level.&lt;/P&gt;&lt;P&gt;And i have a status field that has all the Status Code.&lt;/P&gt;&lt;P&gt;Also another field "Processed" that has Boolean value T and F&lt;/P&gt;&lt;P&gt;Now i have to make a field "Active date" in the script based on these three fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logic i am trying use is,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(Match([Status],'A','P') and [Processed]='F' and [Update Date]=Min([Update Date]), [Update Date], ' ') as [Active Date]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like my logic is set on the Minimum Date from the Update date not the minimum date from the item/granular level for every products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do i write down the code in the script that can work in the Item level? Meaning, getting the minimum date for every product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 01 Aug 2016 15:36:15 GMT</pubDate>
    <dc:creator>BootCam</dc:creator>
    <dc:date>2016-08-01T15:36:15Z</dc:date>
    <item>
      <title>How to get minimum date in the granular level</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-minimum-date-in-the-granular-level/m-p/1102857#M631075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a problem Like this:&lt;/P&gt;&lt;P&gt;I have a date field which has all the update date and I have to take the Minimum Date from this field in the granular level.&lt;/P&gt;&lt;P&gt;And i have a status field that has all the Status Code.&lt;/P&gt;&lt;P&gt;Also another field "Processed" that has Boolean value T and F&lt;/P&gt;&lt;P&gt;Now i have to make a field "Active date" in the script based on these three fields.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Logic i am trying use is,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(Match([Status],'A','P') and [Processed]='F' and [Update Date]=Min([Update Date]), [Update Date], ' ') as [Active Date]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like my logic is set on the Minimum Date from the Update date not the minimum date from the item/granular level for every products.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do i write down the code in the script that can work in the Item level? Meaning, getting the minimum date for every product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 15:36:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-minimum-date-in-the-granular-level/m-p/1102857#M631075</guid>
      <dc:creator>BootCam</dc:creator>
      <dc:date>2016-08-01T15:36:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to get minimum date in the granular level</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-minimum-date-in-the-granular-level/m-p/1102858#M631076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perhaps like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SummaryTable:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Min([Update Date]) as [Active Date]&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...source...&lt;/P&gt;&lt;P&gt;WHERE&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Match(Status, 'A','P') and Processed = 'F'&lt;/P&gt;&lt;P&gt;GROUP BY&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Product&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 16:08:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-minimum-date-in-the-granular-level/m-p/1102858#M631076</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2016-08-01T16:08:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to get minimum date in the granular level</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-minimum-date-in-the-granular-level/m-p/1102859#M631077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gysbert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With the Where clause, Am i not limiting my table with the &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt; Match(Status, 'A','P') and Processed = 'F' filter?&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;But my goal is to keep all the data and make a new filed Active date. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Something like that&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;IF(Match([Status],'A','P') and [Processed]='F' and [Update Date]=Min([Update Date]), [Update Date], ' ') as [Active Date]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;I know this piece of code is wrong but the idea is like that.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Sk&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 16:15:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-minimum-date-in-the-granular-level/m-p/1102859#M631077</guid>
      <dc:creator>BootCam</dc:creator>
      <dc:date>2016-08-01T16:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to get minimum date in the granular level</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-get-minimum-date-in-the-granular-level/m-p/1102860#M631078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can add to your table a min update date, using a group by and left join (bold)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;yourtable:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product,&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; status,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processed,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; updatedate&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;.......&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;left join (yourtable)&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;load &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; product,&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; min(updatedate) as minupdatedate&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;resident yourtable&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;group by product;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // I think you want the min date by product&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then you can do a resident table with an if condition on status, processed, updatedate, minupdatedate to calculate the activedate field&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Aug 2016 19:12:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-get-minimum-date-in-the-granular-level/m-p/1102860#M631078</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-08-01T19:12:27Z</dc:date>
    </item>
  </channel>
</rss>

