<?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 separate the years in a Straight Table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-separate-the-years-in-a-Straight-Table/m-p/722970#M1076892</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Firstly create an year field from Backend Script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD State,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Plant,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Date) AS Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amt&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;....Desktop\EXE1.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, Create 2 expressions in Straight Table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amt Current Year:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum({&amp;lt; Year = { $(=Max(Year(Today()))) } &amp;gt;} Amt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amt Last Year:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum({&amp;lt; Year = { $(=Max(Year(Today()))-1) } &amp;gt;} Amt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;It's good if you create variables for&amp;nbsp; vMaxyear=Max(Year(Today()))) and vPrevyear=Max(Year(Today()))-1) then use it in your expressions:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amt Current Year:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum({&amp;lt; Year = { $(=vMaxyear} &amp;gt;} Amt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amt Last Year:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum({&amp;lt; Year = { $(=vPrevyear) } &amp;gt;} Amt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the Attachment.&lt;/P&gt;&lt;P&gt;Hope that helps and cleared some of your doubts.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aviral Nag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Jul 2014 07:33:14 GMT</pubDate>
    <dc:creator>aveeeeeee7en</dc:creator>
    <dc:date>2014-07-22T07:33:14Z</dc:date>
    <item>
      <title>How to separate the years in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-separate-the-years-in-a-Straight-Table/m-p/722969#M1076889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi I'm a newbie in QlikView. Please help me find the expression or code that is used to sum the date for two different years separately and show it through a Straight Table. To have a better picture of what I'm trying to do, please find the files attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 07:20:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-separate-the-years-in-a-Straight-Table/m-p/722969#M1076889</guid>
      <dc:creator>umartareen</dc:creator>
      <dc:date>2014-07-22T07:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the years in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-separate-the-years-in-a-Straight-Table/m-p/722970#M1076892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Firstly create an year field from Backend Script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD State,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Plant,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(Date) AS Year,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amt&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;....Desktop\EXE1.xlsx]&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, Create 2 expressions in Straight Table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amt Current Year:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum({&amp;lt; Year = { $(=Max(Year(Today()))) } &amp;gt;} Amt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amt Last Year:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum({&amp;lt; Year = { $(=Max(Year(Today()))-1) } &amp;gt;} Amt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;It's good if you create variables for&amp;nbsp; vMaxyear=Max(Year(Today()))) and vPrevyear=Max(Year(Today()))-1) then use it in your expressions:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amt Current Year:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum({&amp;lt; Year = { $(=vMaxyear} &amp;gt;} Amt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Amt Last Year:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Sum({&amp;lt; Year = { $(=vPrevyear) } &amp;gt;} Amt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See the Attachment.&lt;/P&gt;&lt;P&gt;Hope that helps and cleared some of your doubts.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Aviral Nag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 07:33:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-separate-the-years-in-a-Straight-Table/m-p/722970#M1076892</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-07-22T07:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the years in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-separate-the-years-in-a-Straight-Table/m-p/722971#M1076895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works perfect. Thank you very much Aviral Nag.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Jul 2014 09:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-separate-the-years-in-a-Straight-Table/m-p/722971#M1076895</guid>
      <dc:creator>umartareen</dc:creator>
      <dc:date>2014-07-22T09:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to separate the years in a Straight Table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-separate-the-years-in-a-Straight-Table/m-p/722972#M1076898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Close this thread by marking this as Correct Answer so that it would be helpful for others.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Jul 2014 11:56:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-separate-the-years-in-a-Straight-Table/m-p/722972#M1076898</guid>
      <dc:creator>aveeeeeee7en</dc:creator>
      <dc:date>2014-07-29T11:56:49Z</dc:date>
    </item>
  </channel>
</rss>

