<?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: Getting Max and Min Date from a Fact table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Getting-Max-and-Min-Date-from-a-Fact-table/m-p/1130386#M917021</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;Thanks for your feedback.It's basically the same solution both of you suggest and it seems to be quite a bit faster:-).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Steen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 May 2016 13:12:50 GMT</pubDate>
    <dc:creator>sspe</dc:creator>
    <dc:date>2016-05-12T13:12:50Z</dc:date>
    <item>
      <title>Getting Max and Min Date from a Fact table</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-Max-and-Min-Date-from-a-Fact-table/m-p/1130383#M917018</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;When we load our data into Qlikview, we are building a Date dimension based on the first and last date in the Fact table. This is working well, but when the number of records in the fact table starts to grow, it starts to be a little slow to find these two dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We are loading the dates into a temp table and then use PEEK to get the values as you see below -&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DATE_SUMMARY:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;Date(Min(Date_Key)) as Min_Date,&lt;/P&gt;&lt;P&gt;Date(Max(Date_Key)) as Max_Date&lt;/P&gt;&lt;P&gt;Resident [Fact];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;/* Assign the Min_Date and Max_Date to a temp variable */&lt;/P&gt;&lt;P&gt;Let vDateMinTemp = Peek('Min_Date',-1, [DATE_SUMMARY]) ;&lt;/P&gt;&lt;P&gt;Let vDateMaxTemp = Peek('Max_Date',-1, [DATE_SUMMARY]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is now if there are any other (and faster) ways to do this? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Steen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-Max-and-Min-Date-from-a-Fact-table/m-p/1130383#M917018</guid>
      <dc:creator>sspe</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Max and Min Date from a Fact table</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-Max-and-Min-Date-from-a-Fact-table/m-p/1130384#M917019</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be look into this approach:&lt;/P&gt;&lt;P&gt;&lt;A href="http://qlikviewcookbook.com/2013/09/fastest-method-to-read-maxfield-from-a-qvd/" title="http://qlikviewcookbook.com/2013/09/fastest-method-to-read-maxfield-from-a-qvd/"&gt;“Fastest” Method to Read max(field) From a QVD | Qlikview Cookbook&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 09:19:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-Max-and-Min-Date-from-a-Fact-table/m-p/1130384#M917019</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-12T09:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Max and Min Date from a Fact table</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-Max-and-Min-Date-from-a-Fact-table/m-p/1130385#M917020</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: Lato, sans-serif; font-size: 16px; color: #2b2b2b;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-style: inherit; font-weight: inherit; color: #575757;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DATE_SUMMARY&lt;/SPAN&gt;:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;Date(Min(&lt;SPAN style="font-size: 16px;"&gt;Date&lt;/SPAN&gt;)) as Min_Date,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;Date(Max(&lt;SPAN style="font-size: 16px;"&gt;Date&lt;/SPAN&gt;)) as Max_Date;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Lato, sans-serif; font-size: 16px; color: #2b2b2b;"&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-style: inherit; font-weight: inherit; color: #575757;"&gt;LOAD &lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;FieldValue&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;('&lt;SPAN style="font-size: 13px;"&gt;Date_Key'&lt;/SPAN&gt;, r&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;ecno&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;()) as Date&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Lato, sans-serif; font-size: 16px; color: #2b2b2b;"&gt;&lt;SPAN style="color: #575757; font-family: arial, helvetica, sans-serif;"&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;autogenerate &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-weight: inherit;"&gt;FieldValueCount&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;('&lt;SPAN style="font-size: 13px;"&gt;Date_Key&lt;/SPAN&gt;');&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Lato, sans-serif; font-size: 16px; color: #2b2b2b;"&gt;&lt;SPAN style="color: #575757; font-style: inherit; font-family: arial, helvetica, sans-serif; font-weight: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let vDateMinTemp = Peek('Min_Date',-1, 'DATE_SUMMARY') ;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let vDateMaxTemp = Peek('Max_Date',-1, 'DATE_SUMMARY');&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 09:31:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-Max-and-Min-Date-from-a-Fact-table/m-p/1130385#M917020</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-05-12T09:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Getting Max and Min Date from a Fact table</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-Max-and-Min-Date-from-a-Fact-table/m-p/1130386#M917021</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;Thanks for your feedback.It's basically the same solution both of you suggest and it seems to be quite a bit faster:-).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Steen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 May 2016 13:12:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-Max-and-Min-Date-from-a-Fact-table/m-p/1130386#M917021</guid>
      <dc:creator>sspe</dc:creator>
      <dc:date>2016-05-12T13:12:50Z</dc:date>
    </item>
  </channel>
</rss>

