<?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 Using a variable to store an expression? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-variable-to-store-an-expression/m-p/576158#M214380</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a variable 'vSummaryTrendAnalysisPCWeek' defined as the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Sum({&amp;lt;[Week] ={"&amp;gt;$(=num(Week(Max([Trade Date]))-13))&amp;lt;=$(=num(Week(Max([Trade Date]))))"}&amp;gt;} [$ PC])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if I try and plug that variable into a chart as an expression, I just get one number returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I put that line in as an expression, it works fine.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the impression that there's some aspect of quotes and / or $ expansion of the variable that I need to use, but I can't for the life of me work out what I'm supposed to do, anyone got any ideas? Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Apr 2014 13:53:25 GMT</pubDate>
    <dc:creator>richnorris</dc:creator>
    <dc:date>2014-04-29T13:53:25Z</dc:date>
    <item>
      <title>Using a variable to store an expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-to-store-an-expression/m-p/576158#M214380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a variable 'vSummaryTrendAnalysisPCWeek' defined as the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= Sum({&amp;lt;[Week] ={"&amp;gt;$(=num(Week(Max([Trade Date]))-13))&amp;lt;=$(=num(Week(Max([Trade Date]))))"}&amp;gt;} [$ PC])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if I try and plug that variable into a chart as an expression, I just get one number returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I put that line in as an expression, it works fine.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get the impression that there's some aspect of quotes and / or $ expansion of the variable that I need to use, but I can't for the life of me work out what I'm supposed to do, anyone got any ideas? Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 13:53:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-to-store-an-expression/m-p/576158#M214380</guid>
      <dc:creator>richnorris</dc:creator>
      <dc:date>2014-04-29T13:53:25Z</dc:date>
    </item>
    <item>
      <title>Re: Using a variable to store an expression?</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-variable-to-store-an-expression/m-p/576159#M214381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Of course, I just had to remove the leading = sign. I am idiot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Apr 2014 13:56:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-variable-to-store-an-expression/m-p/576159#M214381</guid>
      <dc:creator>richnorris</dc:creator>
      <dc:date>2014-04-29T13:56:13Z</dc:date>
    </item>
  </channel>
</rss>

