<?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: Current Year Vs Previous Year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643415#M1085101</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Hi&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;i want to compare sales for current and previous year but i am getting same values for all. pease help&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;so for that i have declared&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;current year&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;curr_year = Max(sold_Year)&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;previous year&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;prev_year=max(sold_year)-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;for&amp;nbsp; expression for current year&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;=num(sum({&amp;lt;sold_year = {"$(curr_year)"}&amp;gt;}[inv value])/(Sales_INR_Unit),'#,##0.0')&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;for expression for previous_year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;=num(sum({&amp;lt; sold_Year = {"$(=$(prev_year))"}&amp;gt;}&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;[inv value]/Sales_INR_Unit),'#,##0.0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;for total growth&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;=num(&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;sum({&amp;lt;sold_year = {"$(curr_year)"}&amp;gt;}[inv value])&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;-&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;sum({&amp;lt; sold_Year = {"$(=$(prev_year))"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;[inv value])&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;sum({&amp;lt; sold_Year = {"$(=$(prev_year))"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Dec 2017 06:08:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-12-15T06:08:07Z</dc:date>
    <item>
      <title>Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643409#M1085095</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help me in CY Vs PY logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;want to show CY Vs PY Sales.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 06:48:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643409#M1085095</guid>
      <dc:creator>abhaysingh</dc:creator>
      <dc:date>2014-06-07T06:48:28Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643410#M1085096</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Consider you have below script..&lt;/P&gt;&lt;P&gt;================&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; Customer, Sales, Year&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 100, 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp; A, 120, 2013&lt;/P&gt;&lt;P&gt;&amp;nbsp; B, 90, 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp; B, 110, 2013&lt;/P&gt;&lt;P&gt;&amp;nbsp; C, 150, 2012&lt;/P&gt;&lt;P&gt;&amp;nbsp; C, 110, 2013&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===========================&lt;/P&gt;&lt;P&gt;You can show CY vs LY/PY sales growth as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a Straight Table&lt;/P&gt;&lt;P&gt;Dimension &lt;/P&gt;&lt;P&gt;Customer&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expressions&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2012 Sales&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year = {2012}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2013 Sales&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year = {2013}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Growth&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year = {2013}&amp;gt;}Sales)/SUM({&amp;lt;Year = {2012}&amp;gt;}Sales)-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Don't forget to change Number formatting of Growth to percentage from Properties = Number Tab&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 07:04:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643410#M1085096</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-06-07T07:04:13Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643411#M1085097</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Instead of hardcoding 2012,2013.. values, create a variable vMaxYr = Max(Year()).&lt;/P&gt;&lt;P&gt;for PY you can use vMaxYr-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 07:42:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643411#M1085097</guid>
      <dc:creator />
      <dc:date>2014-06-07T07:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643412#M1085098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create variable or by the use of the SET analysis you can create the expressions for Current Yr vs Previous Yr sales. But all ready explain by the member is right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Current Year Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Year = {'$(=Max(Year))'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;By Formula use&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Year = {"$(vCurrYr)"}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Previous Year Sales&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Year = {'$(=Max(Year)-1)'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By Formula Use&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Year = {"$(vPrevYr)"}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 07:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643412#M1085098</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-06-07T07:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643413#M1085099</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if i am using above expression i am using same values for both current year and previous year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 05:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643413#M1085099</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-15T05:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643414#M1085100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to by pass the other fields as well and did you create the correct variables because it is demo code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 06:03:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643414#M1085100</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-15T06:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643415#M1085101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;Hi&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;i want to compare sales for current and previous year but i am getting same values for all. pease help&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;so for that i have declared&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;current year&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;curr_year = Max(sold_Year)&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;previous year&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;prev_year=max(sold_year)-1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;for&amp;nbsp; expression for current year&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;=num(sum({&amp;lt;sold_year = {"$(curr_year)"}&amp;gt;}[inv value])/(Sales_INR_Unit),'#,##0.0')&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;for expression for previous_year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;=num(sum({&amp;lt; sold_Year = {"$(=$(prev_year))"}&amp;gt;}&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;[inv value]/Sales_INR_Unit),'#,##0.0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;for total growth&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;=num(&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;sum({&amp;lt;sold_year = {"$(curr_year)"}&amp;gt;}[inv value])&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;-&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;sum({&amp;lt; sold_Year = {"$(=$(prev_year))"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;[inv value])&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt; &lt;SPAN style="font-family: inherit; font-size: 10pt; font-style: inherit; font-weight: inherit;"&gt;sum({&amp;lt; sold_Year = {"$(=$(prev_year))"}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 06:08:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643415#M1085101</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-15T06:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643416#M1085102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you check because i am getting different values&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please check the snap shot&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="187071" alt="Image.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/187071_Image.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 06:15:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643416#M1085102</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-15T06:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643417#M1085103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sir &lt;/P&gt;&lt;P&gt;please help &lt;/P&gt;&lt;P&gt;i have to replace year with my column name ie sold_year&lt;/P&gt;&lt;P&gt;so now expression will be&lt;/P&gt;&lt;P&gt;sum({sold_year={'$(max(sold_year))'}&amp;gt;} inv_value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;correct?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 06:24:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643417#M1085103</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-12-15T06:24:52Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year Vs Previous Year</title>
      <link>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643418#M1085104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Check on this thread please for your answers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/message/1401862"&gt;Re: variable declaration of last year and current year?&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Dec 2017 06:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-Year-Vs-Previous-Year/m-p/643418#M1085104</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2017-12-15T06:35:52Z</dc:date>
    </item>
  </channel>
</rss>

