<?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: Is This Expression is correct  Sum({$&amp;lt;year={'$(=Year)','$(=$(=(Year)-1})'}&amp;gt;}Sales)?? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585199#M1097528</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year = {'$(=Max(Year))'}&amp;gt;}Sales)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Current Year&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year = {'$(=Max(Year)-1)'}&amp;gt;}Sales)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Last Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know what you want to get as a result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want sales for last two year, use as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;Year&amp;nbsp; = {'&amp;gt;=$(=Max(Year)-1)&amp;lt;=$(=Max(Year))&amp;nbsp; '}&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 May 2014 10:34:37 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2014-05-01T10:34:37Z</dc:date>
    <item>
      <title>Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585198#M1097527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I post an expression regarding sum of sales for Current selection and Previous selection of Year..Is that correct expression??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 10:32:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585198#M1097527</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-01T10:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585199#M1097528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year = {'$(=Max(Year))'}&amp;gt;}Sales)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Current Year&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year = {'$(=Max(Year)-1)'}&amp;gt;}Sales)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For Last Year&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let us know what you want to get as a result?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want sales for last two year, use as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;Year&amp;nbsp; = {'&amp;gt;=$(=Max(Year)-1)&amp;lt;=$(=Max(Year))&amp;nbsp; '}&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 10:34:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585199#M1097528</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-05-01T10:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585200#M1097529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you want a sum of this year + last year?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 10:35:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585200#M1097529</guid>
      <dc:creator />
      <dc:date>2014-05-01T10:35:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585201#M1097530</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;Sum({$&amp;lt;year = {'$(=Year)', '$(=(Year - 1))'}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 10:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585201#M1097530</guid>
      <dc:creator />
      <dc:date>2014-05-01T10:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585202#M1097531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;do you mean max year and previous?&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;Year={$(=max(Year)),$(=max(Year)-1)}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 11:05:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585202#M1097531</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-01T11:05:42Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585203#M1097532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rajesh,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use your SET script like below script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;STRONG&gt;=Sum({$&amp;lt;YourYearField = {'$(=Max(YourYearField))' , '$(=Max(YourYearField)-1)' } &amp;gt;}Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 11:12:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585203#M1097532</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-05-01T11:12:56Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585204#M1097533</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;Did you try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum ({$&amp;lt;Year={$(#=Only(Year))}, Year={$(#=Only(Year)-1)}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 May 2014 12:39:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585204#M1097533</guid>
      <dc:creator>Joseph_Musekura</dc:creator>
      <dc:date>2014-05-01T12:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585205#M1097534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes I want Current and Last year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 09:35:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585205#M1097534</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-02T09:35:43Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585206#M1097535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are so many answers given.&lt;/P&gt;&lt;P&gt;Isn't there any which is solving your problem?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 09:36:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585206#M1097535</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-05-02T09:36:33Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585207#M1097536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No But Here # Represents what??&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 09:37:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585207#M1097536</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-02T09:37:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585208#M1097537</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&amp;nbsp; = {'&amp;gt;=$(=Max(Year)-1)&amp;lt;=$(=Max(Year))&amp;nbsp; '}&amp;gt;}Sales)&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;or&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)),$(=max(Year)-1)}&amp;gt;} Sales)&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;is not working?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 09:39:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585208#M1097537</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-05-02T09:39:11Z</dc:date>
    </item>
    <item>
      <title>Re: Is This Expression is correct  Sum({$&lt;year={'$(=Year)','$(=$(=(Year)-1})'}&gt;}Sales)??</title>
      <link>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585209#M1097538</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;You need to use # in dollars expansion when dealing with Numeric varaible (see an extract from QlikView reference manual )&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;Dollar-Sign Expansion Using a Variable&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;When using a variable for text replacement in the script or in an expression, the following syntax is used:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;$( variablename )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;$( variablename)&lt;/EM&gt; expands to the value in variablename. If variablename does not exist the expansion will&lt;/P&gt;&lt;P&gt;be the empty string.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;For numeric variable expansions&lt;/SPAN&gt;, the syntax&lt;EM&gt; $( variablename )&lt;/EM&gt; will generate a number using the regional decimal&lt;/P&gt;&lt;P&gt;separator, i.e. for many countries a decimal comma. Such an expansion should not be used for numbers&lt;/P&gt;&lt;P&gt;inside the script since these must use decimal point. Instead the expansion $(# variablename ) should be&lt;/P&gt;&lt;P&gt;used. (Note the hash sign). It always yields a valid decimal-point representation of the numeric value of variablename,&lt;/P&gt;&lt;P&gt;possibly with exponential notation (for very large/small numbers). If variablename does not exist&lt;/P&gt;&lt;P&gt;or does not contain a numeric value, it will be expanded to 0 instead.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 May 2014 10:59:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Is-This-Expression-is-correct-Sum-lt-year-Year-Year-1-gt-Sales/m-p/585209#M1097538</guid>
      <dc:creator>Joseph_Musekura</dc:creator>
      <dc:date>2014-05-02T10:59:40Z</dc:date>
    </item>
  </channel>
</rss>

