<?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: expression to find first and last date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440710#M1155051</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Gysbert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Mar 2013 14:51:16 GMT</pubDate>
    <dc:creator>omyahamburg</dc:creator>
    <dc:date>2013-03-14T14:51:16Z</dc:date>
    <item>
      <title>expression to find first and last date</title>
      <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440703#M1155044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table showing items, dates and quantities:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="34894" class="jive-image" alt="Unbenannt.png" src="https://community.qlik.com/legacyfs/online/34894_Unbenannt.png" /&gt;&lt;/P&gt;&lt;P&gt;I want to determine for the item by an expression the first and the last date in the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can someone let me know how ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thx.&lt;/P&gt;&lt;P&gt;Joerg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 09:09:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440703#M1155044</guid>
      <dc:creator>omyahamburg</dc:creator>
      <dc:date>2013-03-14T09:09:38Z</dc:date>
    </item>
    <item>
      <title>Re: expression to find first and last date</title>
      <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440704#M1155045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;max(total Date) for the maximum date and min(total Date) for the minimum date. But your dates will have to be numeric dates. For strings there are maxstring and minstring, but since the days are the first two characters those functions will not give you the result you want. If your dates are strings then you should make them real dates in the script using the date# function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 09:15:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440704#M1155045</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-14T09:15:21Z</dc:date>
    </item>
    <item>
      <title>Re: expression to find first and last date</title>
      <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440705#M1155046</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 recommend using FISRTSORTVALUED() function and may be with MAX() &amp;amp; MIN() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gabrile&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 09:16:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440705#M1155046</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2013-03-14T09:16:37Z</dc:date>
    </item>
    <item>
      <title>Re: expression to find first and last date</title>
      <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440706#M1155047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another way of doing this if you want first and last row even if they are not the oldest and newest dates is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;rowsFechas&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;NoOfRows&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Fechas');&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;firstDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Fecha', 0, 'Fechas');&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;let&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;lastDate&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;peek&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;('Fecha', &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(rowsFechas)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;-1, 'Fechas'); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 09:33:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440706#M1155047</guid>
      <dc:creator />
      <dc:date>2013-03-14T09:33:09Z</dc:date>
    </item>
    <item>
      <title>Re: expression to find first and last date</title>
      <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440707#M1155048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My dates are numeric and it works perfect.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:15:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440707#M1155048</guid>
      <dc:creator>omyahamburg</dc:creator>
      <dc:date>2013-03-14T10:15:10Z</dc:date>
    </item>
    <item>
      <title>Re: expression to find first and last date</title>
      <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440708#M1155049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Gysbert&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I count the number of months when (as in my case shown in the 1. post)&lt;/P&gt;&lt;P&gt;the min date is in previous year ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 14:01:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440708#M1155049</guid>
      <dc:creator>omyahamburg</dc:creator>
      <dc:date>2013-03-14T14:01:07Z</dc:date>
    </item>
    <item>
      <title>Re: expression to find first and last date</title>
      <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440709#M1155050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can find an expression to calculate the difference in months between two dates &lt;A _jive_internal="true" href="https://community.qlik.com/message/193976#193976"&gt;here&lt;/A&gt;. You can create the variable in the script with the SET keyword or manually add a variable with the expression as its value. Use it like =$(MonthDiff(Date1, Date2)) with Date1 and Date2 as the dates you want the difference between.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 14:47:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440709#M1155050</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2013-03-14T14:47:12Z</dc:date>
    </item>
    <item>
      <title>Re: expression to find first and last date</title>
      <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440710#M1155051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Gysbert.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Mar 2013 14:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440710#M1155051</guid>
      <dc:creator>omyahamburg</dc:creator>
      <dc:date>2013-03-14T14:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: expression to find first and last date</title>
      <link>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440711#M1155052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Hello Everyone- In the same requirement i want to find out the 1st po date and 1st po Qty&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;to get the 1st po date i am doing min(po date) which is working fine&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;but to get the 1st po qty i am trying to do&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=Alt(FirstSortedValue(Aggr(Sum([Qty On Order]), [Item Number], [Promise Date]), [Promise Date]), Aggr(Sum([Qty On Order]), [Item Number], [Promise Date]))&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="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 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;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;=Sum({&amp;lt;[Promise Date] = {"$(=Min([Promise Date]))"}&amp;gt;} [Qty On Order])&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="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 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;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;Both the expressions are not working for me please give me some suggetions how to get the 1st PO Qty for that item.&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="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: 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;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;the other thing happening &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;=Sum({&amp;lt;[Promise Date] = {"$(=Min([Promise Date]))"}&amp;gt;} [Qty On Order]) with this expression is that it is working only if i select one item, and is displaying all over when no item is selected in the chart. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Aug 2015 16:37:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-to-find-first-and-last-date/m-p/440711#M1155052</guid>
      <dc:creator>maahivee</dc:creator>
      <dc:date>2015-08-27T16:37:03Z</dc:date>
    </item>
  </channel>
</rss>

