<?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: How to find next/previous value of the field? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831646#M292628</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the case where you would like to select a next date with data in the fact table, you can maybe use something like&lt;/P&gt;&lt;P&gt;=SubField(Concat({&amp;lt;Date={"&amp;gt;$(=Date)"},Value={"&amp;gt;0"}&amp;gt;} DISTINCT Date,'@',Date),'@',1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It uses the Concat function with a date greater then the current selected date and a value &amp;gt;0 sorted by date. The SubField function selects the first possible next date out of these values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Apr 2015 11:52:13 GMT</pubDate>
    <dc:creator>stigchel</dc:creator>
    <dc:date>2015-04-27T11:52:13Z</dc:date>
    <item>
      <title>How to find next/previous value of the field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831644#M292626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have dashboard with data showing always by 1 date. For easy navigation between date I've made these buttons&lt;/P&gt;&lt;P&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/85063_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/P&gt;&lt;P&gt;where buttons make just +/- 1 or min/max to selected date. The issue is - there are gaps in the data, so there isn't data for every day. Once users stuck on such date, Date filter just get vanished.&lt;/P&gt;&lt;P&gt;Is there any possibility to find next date with data, instead of just making + or - 1 day to selected date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 10:07:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831644#M292626</guid>
      <dc:creator>yura_ratu</dc:creator>
      <dc:date>2015-04-27T10:07:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to find next/previous value of the field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831645#M292627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Before finding the next possible value you should think if it's could not better to fill the gaps within the datamodel by using from a master calendar: &lt;A href="https://community.qlik.com/qlik-blogpost/2802"&gt;The Master Calendar&lt;/A&gt;. Further I'm not sure if it's necessary to build this with buttons/actions instead of using from a calendar-box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A way to find to find the next possible value could be the function fieldvalue() which picked the n-distinct value from a field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 10:35:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831645#M292627</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-04-27T10:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to find next/previous value of the field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831646#M292628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the case where you would like to select a next date with data in the fact table, you can maybe use something like&lt;/P&gt;&lt;P&gt;=SubField(Concat({&amp;lt;Date={"&amp;gt;$(=Date)"},Value={"&amp;gt;0"}&amp;gt;} DISTINCT Date,'@',Date),'@',1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It uses the Concat function with a date greater then the current selected date and a value &amp;gt;0 sorted by date. The SubField function selects the first possible next date out of these values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example attached&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 11:52:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831646#M292628</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2015-04-27T11:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to find next/previous value of the field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831647#M292629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Piet Hein,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Great solution and explanation, thank you a lot!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 12:08:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831647#M292629</guid>
      <dc:creator>yura_ratu</dc:creator>
      <dc:date>2015-04-27T12:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to find next/previous value of the field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831648#M292630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just to add, to select previous date with data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SubField(Concat({&amp;lt;Date={"&amp;lt;$(=Date)"},Value={"&amp;gt;0"}&amp;gt;} DISTINCT Date,'@',Date),'@',Count({&amp;lt;Date={"&amp;lt;$(=Date)"},Value={"&amp;gt;0"}&amp;gt;} DISTINCT Date))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 12:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831648#M292630</guid>
      <dc:creator>yura_ratu</dc:creator>
      <dc:date>2015-04-27T12:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to find next/previous value of the field?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831649#M292631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I thought you could work that out..&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One extra tip, you could also reverse the sort order and still use SubField 1, e.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=SubField(Concat({&amp;lt;Date={"&amp;lt;$(=Date)"},Value={"&amp;gt;0"}&amp;gt;} DISTINCT Date,'@',1/Date),'@',1)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Apr 2015 12:47:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-find-next-previous-value-of-the-field/m-p/831649#M292631</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2015-04-27T12:47:11Z</dc:date>
    </item>
  </channel>
</rss>

