<?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: Variable not summing as anticipated in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-not-summing-as-anticipated/m-p/1802008#M1211785</link>
    <description>&lt;P&gt;Works a treat.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks tresesco&lt;/P&gt;</description>
    <pubDate>Fri, 23 Apr 2021 06:48:53 GMT</pubDate>
    <dc:creator>NickBentley</dc:creator>
    <dc:date>2021-04-23T06:48:53Z</dc:date>
    <item>
      <title>Variable not summing as anticipated</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-not-summing-as-anticipated/m-p/1801996#M1211783</link>
      <description>&lt;P&gt;I am using the following expression to sum the the sales for the next four weeks from last year.&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Chron_Week = {"$(dMaxChronWeek-52)"},Fy_Wk=,FY_Year=&amp;gt;}Units_Sold)+ Sum({&amp;lt;Chron_Week = {"$(dMaxChronWeek-51)"},Fy_Wk=,FY_Year=&amp;gt;}Units_Sold)+ Sum({&amp;lt;Chron_Week = {"$(dMaxChronWeek-50)"},Fy_Wk=,FY_Year=&amp;gt;}Units_Sold)+ Sum({&amp;lt;Chron_Week = {"$(dMaxChronWeek-49)"},Fy_Wk=,FY_Year=&amp;gt;}Units_Sold)&lt;/P&gt;&lt;P&gt;The expression is working fine and giving the expected result.&lt;/P&gt;&lt;P&gt;Because I am going to be using the same expression in multiple tables, I have converted it to a variable:&lt;/P&gt;&lt;P&gt;dUnitsLY+4weeks&lt;/P&gt;&lt;P&gt;However, when I write this variable in the expression as $(dUnitsLY+4weeks), I get the overall number(914) listed for every customer and not the customer's individual sales for that period. When I use the extended expression (as above) it does results for individual customers.&lt;/P&gt;&lt;P&gt;Can some please explain why the expression is&amp;nbsp; giving a different result when wrapped&amp;nbsp; in the variable?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Nick&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 06:28:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-not-summing-as-anticipated/m-p/1801996#M1211783</guid>
      <dc:creator>NickBentley</dc:creator>
      <dc:date>2021-04-23T06:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Variable not summing as anticipated</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-not-summing-as-anticipated/m-p/1801998#M1211784</link>
      <description>&lt;P&gt;While defining the variable, remove the preceding '=' and try.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 06:32:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-not-summing-as-anticipated/m-p/1801998#M1211784</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2021-04-23T06:32:32Z</dc:date>
    </item>
    <item>
      <title>Re: Variable not summing as anticipated</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-not-summing-as-anticipated/m-p/1802008#M1211785</link>
      <description>&lt;P&gt;Works a treat.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks tresesco&lt;/P&gt;</description>
      <pubDate>Fri, 23 Apr 2021 06:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-not-summing-as-anticipated/m-p/1802008#M1211785</guid>
      <dc:creator>NickBentley</dc:creator>
      <dc:date>2021-04-23T06:48:53Z</dc:date>
    </item>
  </channel>
</rss>

