<?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 How to evaluate a variable to a field in an expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-evaluate-a-variable-to-a-field-in-an-expression/m-p/343993#M493767</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He James,&lt;/P&gt;&lt;P&gt;This is possible:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; font-family: Arial; color: #0000ff;"&gt;sum( {$&amp;lt;&lt;SPAN style="color: #ff0000;"&gt;field&lt;/SPAN&gt; = {'$(=&lt;STRONG style="color: #ff0000; font-size: 12px; background-color: #eef4f9; font-family: Arial;"&gt;(vVariable)'&lt;/STRONG&gt;}&amp;gt;} Sales) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using a date field you have to make sure that the format of the variable is equal to format of the field.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 May 2012 13:23:20 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-05-09T13:23:20Z</dc:date>
    <item>
      <title>How to evaluate a variable to a field in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-evaluate-a-variable-to-a-field-in-an-expression/m-p/343992#M493766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sure there's a straightforward answer to this, but I can't find it I'm afraid.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to include a variable field in a chart expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e.g. suppose the expression is &lt;STRONG&gt;sum( {$&amp;lt;Product = {}&amp;gt;} Sales)&lt;/STRONG&gt;. It's the Product bit that I want to vary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what I want to do is something like &lt;STRONG style="color: #0000ff;"&gt;sum( {$&amp;lt;&lt;SPAN style="color: #ff0000;"&gt;field(vVariable)&lt;/SPAN&gt; = {}&amp;gt;} Sales)&lt;/STRONG&gt;, so that by changing vVariable, the expression uses a different field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't seem to evaluate the variable to become an actual reference to a field, if you see what I mean. Can this be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks as always&lt;/P&gt;&lt;P&gt;James&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 12:40:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-evaluate-a-variable-to-a-field-in-an-expression/m-p/343992#M493766</guid>
      <dc:creator />
      <dc:date>2012-05-09T12:40:49Z</dc:date>
    </item>
    <item>
      <title>How to evaluate a variable to a field in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-evaluate-a-variable-to-a-field-in-an-expression/m-p/343993#M493767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;He James,&lt;/P&gt;&lt;P&gt;This is possible:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; font-family: Arial; color: #0000ff;"&gt;sum( {$&amp;lt;&lt;SPAN style="color: #ff0000;"&gt;field&lt;/SPAN&gt; = {'$(=&lt;STRONG style="color: #ff0000; font-size: 12px; background-color: #eef4f9; font-family: Arial;"&gt;(vVariable)'&lt;/STRONG&gt;}&amp;gt;} Sales) &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using a date field you have to make sure that the format of the variable is equal to format of the field.&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Frank&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 13:23:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-evaluate-a-variable-to-a-field-in-an-expression/m-p/343993#M493767</guid>
      <dc:creator />
      <dc:date>2012-05-09T13:23:20Z</dc:date>
    </item>
    <item>
      <title>How to evaluate a variable to a field in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-evaluate-a-variable-to-a-field-in-an-expression/m-p/343994#M493768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;James,&lt;/P&gt;&lt;P&gt;I misread your question;&lt;/P&gt;&lt;P&gt;I think you need this:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; font-family: Arial; color: #0000ff;"&gt;sum( {$&amp;lt;$&lt;SPAN style="color: #ff0000;"&gt;(vVariable)&lt;/SPAN&gt; = {}&amp;gt;} Sales)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="background-color: #eef4f9; font-size: 12px; font-family: Arial; color: #0000ff;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 May 2012 14:24:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-evaluate-a-variable-to-a-field-in-an-expression/m-p/343994#M493768</guid>
      <dc:creator />
      <dc:date>2012-05-09T14:24:00Z</dc:date>
    </item>
    <item>
      <title>How to evaluate a variable to a field in an expression</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-evaluate-a-variable-to-a-field-in-an-expression/m-p/343995#M493769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Try this&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sum($(=vVariable) Sales) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 May 2012 17:47:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-evaluate-a-variable-to-a-field-in-an-expression/m-p/343995#M493769</guid>
      <dc:creator />
      <dc:date>2012-05-15T17:47:57Z</dc:date>
    </item>
  </channel>
</rss>

