<?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: Return minimum date from the next day in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136336#M761711</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;As a solution you could create a small extra table with an extra Date dimension. That new Date dimension would be linked to two date values in the original Date dimension, the current date and its tomorrow.&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;AsOf:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD DISTINCT&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date as Date_AsOf,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date + IterNo() -1 as Date,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;IterNo() -1&amp;nbsp; as DateDiff&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;RESIDENT&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...table with dates and times...&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHILE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IterNo() &amp;lt;=2&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&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;Then you can use Date_AsOf as chart dimension. In your expressions you need add some set analysis magic to make things keep working. The Date_AsOf would make the expressions calculate results over two Date values, the date and its tomorrow. So you'd change for example sum(Sales) to sum({&amp;lt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;DateDiff={0}&lt;/STRONG&gt;&amp;gt;}Sales).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you use a listbox to let the user make selections in the Date dimension then you'd need something to make that selection be applied to Date_AsOf: &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum({&amp;lt;DateDiff={0}, &lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Date=, Date_AsOf=P(Date)&lt;/STRONG&gt;&amp;gt;}Sales).&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: 13.3333px; 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: 13.3333px; font-family: inherit;"&gt;And to calculate your Time you'd use: &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;min({&amp;lt;Date, Date_AsOf=P(Date), &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;DateDiff={1}&lt;/STRONG&gt;&amp;gt;}Time)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Aug 2018 12:04:15 GMT</pubDate>
    <dc:creator>Gysbert_Wassenaar</dc:creator>
    <dc:date>2018-08-14T12:04:15Z</dc:date>
    <item>
      <title>Return minimum date from the next day</title>
      <link>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136333#M761708</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 want to return the minimum time value from the next day in a straight table (date is used as one of the dimensions)&lt;/P&gt;&lt;P&gt;I've searched the community and come up with the following set analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min({&amp;lt;Date={"$(=max(Date)+1)"}&amp;gt;}Time)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It however doesn't seem to work. Could anyone assist me in where I'm going wrong?&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/Return-minimum-date-from-the-next-day/m-p/136333#M761708</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Return minimum date from the next day</title>
      <link>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136334#M761709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;$(=max(Date)) is evaluated at the document level, so it returns the absolute maximum date possible given the active selections. This is likely the overall maximum date. You then tell the expression to calculate a set where the Date is the maximum Date + 1. This is a Date that does not exist in the possible Date values given the selections. So the result is an empty set.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;And there's a good chance that Date has a date format while max(Date) returns a number so there won't be any match and the result is then an empy set.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also you also use Date as a dimension in your chart. The set calculated by the set analysis expression is intersected with the set calculated by the set analysis expression. So for any row in the table Date has the value of the Date dimension for that row and must also have the value that's calculated by the set analysis expression. If those are different values (as you would like to do with the next day for a date) the result is an empty set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a solution you could create a small extra table with an extra Date dimension. That new Date dimension would be linked to two date values in the original Date dimension, the current date and its tomorrow.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2018 11:50:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136334#M761709</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-08-14T11:50:15Z</dc:date>
    </item>
    <item>
      <title>Re: Return minimum date from the next day</title>
      <link>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136335#M761710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Gysbert, I think that makes sense to me!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So my next question is, how could I return the minimum of the next day? Is it as simple as min(time)+1?&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;or is this not possible?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2018 11:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136335#M761710</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-14T11:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Return minimum date from the next day</title>
      <link>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136336#M761711</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;As a solution you could create a small extra table with an extra Date dimension. That new Date dimension would be linked to two date values in the original Date dimension, the current date and its tomorrow.&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;AsOf:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD DISTINCT&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date as Date_AsOf,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date + IterNo() -1 as Date,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;IterNo() -1&amp;nbsp; as DateDiff&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;RESIDENT&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...table with dates and times...&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;WHILE&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IterNo() &amp;lt;=2&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ;&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;Then you can use Date_AsOf as chart dimension. In your expressions you need add some set analysis magic to make things keep working. The Date_AsOf would make the expressions calculate results over two Date values, the date and its tomorrow. So you'd change for example sum(Sales) to sum({&amp;lt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;DateDiff={0}&lt;/STRONG&gt;&amp;gt;}Sales).&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;If you use a listbox to let the user make selections in the Date dimension then you'd need something to make that selection be applied to Date_AsOf: &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;sum({&amp;lt;DateDiff={0}, &lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Date=, Date_AsOf=P(Date)&lt;/STRONG&gt;&amp;gt;}Sales).&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: 13.3333px; 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: 13.3333px; font-family: inherit;"&gt;And to calculate your Time you'd use: &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px;"&gt;min({&amp;lt;Date, Date_AsOf=P(Date), &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;DateDiff={1}&lt;/STRONG&gt;&amp;gt;}Time)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:04:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136336#M761711</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2018-08-14T12:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: Return minimum date from the next day</title>
      <link>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136337#M761712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jamie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What do you mean by Next Day ? Do you have data for next day in your data set ? Are you referring to today as current dater and trying to find the next date ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;KC &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:06:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136337#M761712</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2018-08-14T12:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: Return minimum date from the next day</title>
      <link>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136338#M761713</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I have a set of date/times.&lt;/P&gt;&lt;P&gt;I'm extracting the date to use as the dimension for my straight table and then based on certain criteria want to return either maximum date/time of the same day or the minimum date/time of the next day.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Aug 2018 12:31:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136338#M761713</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-08-14T12:31:17Z</dc:date>
    </item>
    <item>
      <title>Re: Return minimum date from the next day</title>
      <link>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136339#M761714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jamie,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the attached sample, may be you get some idea out of it.:)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;KC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Aug 2018 06:31:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Return-minimum-date-from-the-next-day/m-p/136339#M761714</guid>
      <dc:creator>jyothish8807</dc:creator>
      <dc:date>2018-08-15T06:31:19Z</dc:date>
    </item>
  </channel>
</rss>

