<?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 Picking first date in multiple date set in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267685#M497857</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a date field imported as: &lt;SPAN style="font-size: 8pt;"&gt;cast(date.date_full as date) AS [Discharge Date] . &lt;SPAN style="font-size: 10pt;"&gt;When I pick a date range within QlikView such as Jan. 1st to March 31st, I want to pick just the first date for a table. ie. Jan 1st, 2011. What should the expression look like? I would think it would be something like: min([Date Discharge]) or first([Date Discharge]), but these are not correct... Can someone please tell me how to do this? Thanks.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 11 Aug 2011 17:42:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-11T17:42:50Z</dc:date>
    <item>
      <title>Picking first date in multiple date set</title>
      <link>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267685#M497857</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a date field imported as: &lt;SPAN style="font-size: 8pt;"&gt;cast(date.date_full as date) AS [Discharge Date] . &lt;SPAN style="font-size: 10pt;"&gt;When I pick a date range within QlikView such as Jan. 1st to March 31st, I want to pick just the first date for a table. ie. Jan 1st, 2011. What should the expression look like? I would think it would be something like: min([Date Discharge]) or first([Date Discharge]), but these are not correct... Can someone please tell me how to do this? Thanks.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 17:42:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267685#M497857</guid>
      <dc:creator />
      <dc:date>2011-08-11T17:42:50Z</dc:date>
    </item>
    <item>
      <title>Re: Picking first date in multiple date set</title>
      <link>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267686#M497858</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Min([Date Discharge]) gives you the minimum date possible based on your current selections, but what do you mean by "pick... for a table"?&amp;nbsp; You mean, for example, have a table by customer of the sum of sales for just that minimum date?&amp;nbsp; That would end up as an expression something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;[Date Discharge]={'$(=min([Date Discharge]))'}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you need depends on your requirement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 17:59:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267686#M497858</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-11T17:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: Picking first date in multiple date set</title>
      <link>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267687#M497859</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;could you please explain what the cast() expression does? Couldn't find it in the manual.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I assume it's a typo here in the forum that you use [Discharge Date] in the load and [Date Discharge] for the min, right? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min([Date Discharge]) should work if your Date is really a Date type / numerical.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To limit your data, you could use a Date as dimension and then e.g. sum(if (Date=min([Date Discharge]), value))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edited expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edited by swuehl&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 18:00:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267687#M497859</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-08-11T18:00:39Z</dc:date>
    </item>
    <item>
      <title>Picking first date in multiple date set</title>
      <link>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267688#M497860</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Yes I meant to type min([Discharge Date]) or first([Discharge Date]) above.... however, that is not the problem just a typo.... when I do min([Discharge Date]), I get a number like 40504... instead of the date like 1/1/2011.... any help would be appreciated..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 18:52:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267688#M497860</guid>
      <dc:creator />
      <dc:date>2011-08-11T18:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: Picking first date in multiple date set</title>
      <link>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267689#M497861</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;40504 is the internal representation of the date, the number of days since December 30, 1899.&amp;nbsp; It sounds like your discharge date is not properly formatted.&amp;nbsp; Document Propterties -&amp;gt; Numbers -&amp;gt; Discharge Date -&amp;gt; select "Date" -&amp;gt; checkmark "Survive reload".&amp;nbsp; That should work, as min() should preserve your date formatting.&amp;nbsp; For a sum(if()), you don't even need it formatted - QlikView will compare the internal representations, and couldn't care less how you choose to format it for display.&amp;nbsp; For set analysis like I posted, which compares the formatted value, if all else fails you may need to explain to QlikView again that it's a date:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum({&amp;lt;[Discharge Date]={'$(=date(min([Discharge Date])))'}&amp;gt;} Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That shouldn't be necessary, though, as long as your date field is properly formatted.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Aug 2011 19:02:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Picking-first-date-in-multiple-date-set/m-p/267689#M497861</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-08-11T19:02:52Z</dc:date>
    </item>
  </channel>
</rss>

