<?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 max(Year)-1 returns somethins wrong date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/max-Year-1-returns-somethins-wrong-date/m-p/1387579#M514733</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;I have a listbox with years (including 2018 from calendar database) and a variable vPriorYear, which has assigned&amp;nbsp;&amp;nbsp;&amp;nbsp; =max(Year)-1.&lt;/P&gt;&lt;P&gt;Now I created a text box with this - =$(vPriorYear) or I also tried this -&amp;nbsp;&amp;nbsp; =vPriorYear .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I click through the years ans sometimes ( cant predict when) instead of the last year of the clicked year itdisplays 2017. So for example I click 2014 and text box displays 2017. It only reverse to 2017 year, not other different year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I this behaviour familiar to someone? What can I do? Is here some other expression to refer to previous year of the selected that I can try?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 11 Aug 2017 10:05:45 GMT</pubDate>
    <dc:creator>retko1985</dc:creator>
    <dc:date>2017-08-11T10:05:45Z</dc:date>
    <item>
      <title>max(Year)-1 returns somethins wrong date</title>
      <link>https://community.qlik.com/t5/QlikView/max-Year-1-returns-somethins-wrong-date/m-p/1387579#M514733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, &lt;/P&gt;&lt;P&gt;I have a listbox with years (including 2018 from calendar database) and a variable vPriorYear, which has assigned&amp;nbsp;&amp;nbsp;&amp;nbsp; =max(Year)-1.&lt;/P&gt;&lt;P&gt;Now I created a text box with this - =$(vPriorYear) or I also tried this -&amp;nbsp;&amp;nbsp; =vPriorYear .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I click through the years ans sometimes ( cant predict when) instead of the last year of the clicked year itdisplays 2017. So for example I click 2014 and text box displays 2017. It only reverse to 2017 year, not other different year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I this behaviour familiar to someone? What can I do? Is here some other expression to refer to previous year of the selected that I can try?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 10:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-Year-1-returns-somethins-wrong-date/m-p/1387579#M514733</guid>
      <dc:creator>retko1985</dc:creator>
      <dc:date>2017-08-11T10:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: max(Year)-1 returns somethins wrong date</title>
      <link>https://community.qlik.com/t5/QlikView/max-Year-1-returns-somethins-wrong-date/m-p/1387580#M514734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post a sample representative qvw?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 10:18:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-Year-1-returns-somethins-wrong-date/m-p/1387580#M514734</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-08-11T10:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: max(Year)-1 returns somethins wrong date</title>
      <link>https://community.qlik.com/t5/QlikView/max-Year-1-returns-somethins-wrong-date/m-p/1387581#M514735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try this out in the expression column&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; font-size: 13px;"&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum({&amp;lt;Year= {$(= max(Year-1))}&amp;gt;}[Field Name])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 10:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-Year-1-returns-somethins-wrong-date/m-p/1387581#M514735</guid>
      <dc:creator>chanin7893</dc:creator>
      <dc:date>2017-08-11T10:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: max(Year)-1 returns somethins wrong date</title>
      <link>https://community.qlik.com/t5/QlikView/max-Year-1-returns-somethins-wrong-date/m-p/1387582#M514736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I figured it out. There was a problem with alternate states. This works fine -&amp;nbsp; =&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 10pt; font-family: Arial;"&gt;$(=max({&amp;lt;Year=$::Year&amp;gt;}Year-1))&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #808080; font-family: Arial; font-size: 10pt;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Aug 2017 11:09:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/max-Year-1-returns-somethins-wrong-date/m-p/1387582#M514736</guid>
      <dc:creator>retko1985</dc:creator>
      <dc:date>2017-08-11T11:09:12Z</dc:date>
    </item>
  </channel>
</rss>

