<?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 Year number in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Year-number/m-p/603748#M1105708</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem to compare the current year with the previous year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(=Max(Year-1))}&amp;gt;}if(Kontonummer &amp;gt;= 41250000 and Kontonummer &amp;lt; 49300000,SummeSoll-SummeHaben))*-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(=Max(Year))}&amp;gt;}if(Kontonummer &amp;gt;= 41250000 and Kontonummer &amp;lt; 49300000,SummeSoll-SummeHaben))*-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is, the current year is 2014 and the previous year 41639.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is in the previous year the number????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I formatted the field WJ in the script like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WJ, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(Date#(WJ,'YYYYMMDD'),'DD.MM.YYYY') AS DATE, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(Date#(WJ,'YYYYMMDD'),'YYYY') AS Year,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are only two values in WJ, (20130101 and 20140101)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2014 15:22:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-04-04T15:22:09Z</dc:date>
    <item>
      <title>Year number</title>
      <link>https://community.qlik.com/t5/QlikView/Year-number/m-p/603748#M1105708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a problem to compare the current year with the previous year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(=Max(Year-1))}&amp;gt;}if(Kontonummer &amp;gt;= 41250000 and Kontonummer &amp;lt; 49300000,SummeSoll-SummeHaben))*-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Year={$(=Max(Year))}&amp;gt;}if(Kontonummer &amp;gt;= 41250000 and Kontonummer &amp;lt; 49300000,SummeSoll-SummeHaben))*-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem is, the current year is 2014 and the previous year 41639.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is in the previous year the number????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I formatted the field WJ in the script like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; WJ, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(Date#(WJ,'YYYYMMDD'),'DD.MM.YYYY') AS DATE, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATE(Date#(WJ,'YYYYMMDD'),'YYYY') AS Year,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are only two values in WJ, (20130101 and 20140101)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 15:22:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-number/m-p/603748#M1105708</guid>
      <dc:creator />
      <dc:date>2014-04-04T15:22:09Z</dc:date>
    </item>
    <item>
      <title>Re: Year number</title>
      <link>https://community.qlik.com/t5/QlikView/Year-number/m-p/603749#M1105709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of:&lt;/P&gt;&lt;P&gt;DATE(Date#(WJ,'YYYYMMDD'),'YYYY') AS Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use the Year() function:&lt;/P&gt;&lt;P&gt;Year(Date#(WJ,'YYYYMMDD')) AS Year,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 15:30:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-number/m-p/603749#M1105709</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-04-04T15:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Year number</title>
      <link>https://community.qlik.com/t5/QlikView/Year-number/m-p/603750#M1105710</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;sum({$&amp;lt;Year={'$(=NUM(Max(Year-1)))'}&amp;gt;}if(Kontonummer &amp;gt;= 41250000 and Kontonummer &amp;lt; 49300000,SummeSoll-SummeHaben))*-1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;Year={'$(=Max(Year))'}&amp;gt;}if(Kontonummer &amp;gt;= 41250000 and Kontonummer &amp;lt; 49300000,SummeSoll-SummeHaben))*-1&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 15:30:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-number/m-p/603750#M1105710</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-04-04T15:30:58Z</dc:date>
    </item>
    <item>
      <title>Re: Year number</title>
      <link>https://community.qlik.com/t5/QlikView/Year-number/m-p/603751#M1105711</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;Andreas &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Max(Year-1)&lt;/SPAN&gt; it is not correct, the corret is: &lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;STRONG&gt;Max(Year)-1)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or try this:&lt;/P&gt;&lt;P&gt;Current year =&amp;gt; Year(Today())&lt;/P&gt;&lt;P&gt;Previous year =&amp;gt; AddMonths(Year(Today()), -12)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 15:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-number/m-p/603751#M1105711</guid>
      <dc:creator>MarcoARaymundo</dc:creator>
      <dc:date>2014-04-04T15:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Year number</title>
      <link>https://community.qlik.com/t5/QlikView/Year-number/m-p/603752#M1105712</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank u &lt;/P&gt;&lt;P&gt;good to work with profis....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 20:55:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Year-number/m-p/603752#M1105712</guid>
      <dc:creator />
      <dc:date>2014-04-04T20:55:52Z</dc:date>
    </item>
  </channel>
</rss>

