<?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 Variables in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/298665#M499050</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have calculated a variable to calculate vC=A/B, now i need to apply this variable inside different tables using set analysis to refine data.&lt;/P&gt;&lt;P&gt;I've some troubles in sintax like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;COLOR={yellow}, YEAR={2011}&amp;gt;}$(vC)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where am I mistaking?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2011 12:40:23 GMT</pubDate>
    <dc:creator>canmarroig</dc:creator>
    <dc:date>2011-06-17T12:40:23Z</dc:date>
    <item>
      <title>Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/298665#M499050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have calculated a variable to calculate vC=A/B, now i need to apply this variable inside different tables using set analysis to refine data.&lt;/P&gt;&lt;P&gt;I've some troubles in sintax like: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum({$&amp;lt;COLOR={yellow}, YEAR={2011}&amp;gt;}$(vC)).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where am I mistaking?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 12:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/298665#M499050</guid>
      <dc:creator>canmarroig</dc:creator>
      <dc:date>2011-06-17T12:40:23Z</dc:date>
    </item>
    <item>
      <title>Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/298666#M499051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My idea is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({$&amp;lt;COLOR = {"yellow"},YEAR = {2011}&amp;gt;}$(vC))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your values aren't numeric you need to put them in a double quote sign.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 14:09:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/298666#M499051</guid>
      <dc:creator />
      <dc:date>2011-06-17T14:09:32Z</dc:date>
    </item>
    <item>
      <title>Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/298667#M499052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;isnt it single quotes for literals? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;btw Can, could it be that you entered a = in the beginning of your variable definition? You should omit that.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 14:14:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/298667#M499052</guid>
      <dc:creator />
      <dc:date>2011-06-17T14:14:08Z</dc:date>
    </item>
    <item>
      <title>Re: Variables in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/298668#M499053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Hi Can,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;There are two ways to use variables. I mean the scope of variable changes by adding "=" &amp;amp; not adding "=" at the beginning of the declaration. For example if you declare a variable by pressing (Alt + Ctrl + V) - Variable Overview Window. Something like this...(attached the image)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;vSales&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;IMG /&gt;Sum (PurchaseAmt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;vSales2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Sum (PurchaseAmt)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Both of them looks very similar but they behave differently within QV. I mean vSales works as dollar sign expansion and vSales2 is calculated at the document level and then the value is sent to the object. However, when you are using vSales then the variable is evaluated for every dimension within your object. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;In your case, I am assuming that you are using dollar sign expansion (Like vSales in above example). Then you need the below expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000080;"&gt;&lt;STRONG style="font-family: trebuchet ms,geneva;"&gt;=sum({$&amp;lt;COLOR={yellow}, YEAR={2011}&amp;gt;} $(=($(vC))))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;If this does not work, then please can you post the sample QV document?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: trebuchet ms,geneva;"&gt;Thanks - DV&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="VariableOveriew.png" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/5303_VariableOveriew.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 14:22:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-in-set-analysis/m-p/298668#M499053</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-06-17T14:22:52Z</dc:date>
    </item>
  </channel>
</rss>

