<?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 for Chart Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-for-Chart-Expression/m-p/1097165#M364396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at the suggested solutions here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/198307"&gt;Can I SET or LET a variable to include a $(=...)&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 15 Jan 2016 19:53:40 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-01-15T19:53:40Z</dc:date>
    <item>
      <title>Variable for Chart Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-for-Chart-Expression/m-p/1097164#M364395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have expressions that need to be reused in many charts in my application.&amp;nbsp; I would like to use a variable to do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression would look like this:&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;REQUEST_CREATED_DATE={'&amp;gt;=$(vStartDate)'}, REQUEST_TICKET_TYPE={'Incidents'}&amp;gt;} TICKET_COUNT)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that the variable $(vStartDate) inside the expression is getting set to the date value (e.g. 1/1/2016) instead of the variable name.&amp;nbsp; I need the text in the expression to be exactly like the above so that $(vStartDate) will change as selections are made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I have tried the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vVariable&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = SUM({&amp;lt;REQUEST_CREATED_DATE={'&amp;gt;=$(vStartDate)'}, REQUEST_TICKET_TYPE={'Incidents'}&amp;gt;} TICKET_COUNT); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SET&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vVariable&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"SUM({&amp;lt;REQUEST_CREATED_DATE={'&amp;gt;=$(vStartDate)'}, REQUEST_TICKET_TYPE={'Incidents'}&amp;gt;} TICKET_COUNT)"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;The result for both is &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;SUM&lt;/STRONG&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;REQUEST_CREATED_DATE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'&amp;gt;=1/1/2016'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;REQUEST_TICKET_TYPE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'Incidents'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;TICKET_COUNT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Does anyone have a solution for this?&amp;nbsp; Note that I cannot use macros. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 18:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-for-Chart-Expression/m-p/1097164#M364395</guid>
      <dc:creator>wnorwood</dc:creator>
      <dc:date>2016-01-15T18:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: Variable for Chart Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-for-Chart-Expression/m-p/1097165#M364396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have a look at the suggested solutions here&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/198307"&gt;Can I SET or LET a variable to include a $(=...)&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 19:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-for-Chart-Expression/m-p/1097165#M364396</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-01-15T19:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Variable for Chart Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-for-Chart-Expression/m-p/1097166#M364397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried making changes to vStartDate cause I believe that the way it is structured the above expression should change with changes in vStartDate. Can you share a sample where this isn't happening?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 19:57:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-for-Chart-Expression/m-p/1097166#M364397</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-01-15T19:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Variable for Chart Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-for-Chart-Expression/m-p/1097167#M364398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the replies! One of the solutions in the link worked for me.&amp;nbsp; I had to use the SET the variable with a different character then replace the character in a LET solution since I had single quotes in my text.&amp;nbsp; Thanks again!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jan 2016 21:20:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-for-Chart-Expression/m-p/1097167#M364398</guid>
      <dc:creator>wnorwood</dc:creator>
      <dc:date>2016-01-15T21:20:54Z</dc:date>
    </item>
  </channel>
</rss>

