<?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 Problems getting set analysis working correctly with variable? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problems-getting-set-analysis-working-correctly-with-variable/m-p/401072#M149252</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 some problem getting a set analysis expression to work when using a variable.&lt;/P&gt;&lt;P&gt;My expression looks like this:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Product={$(vProduct)}&amp;gt;} Output) &lt;/P&gt;&lt;P&gt;and the variable can take on two different values, W12V32 and 9R32.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the variable takes on value W12V32 the expression above works fine, however if the variable takes on the value 9R32 it does not work.&lt;/P&gt;&lt;P&gt;However, the expression works fine if i hardcode it like this:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Product={'9R32'}&amp;gt;} Output) &lt;/P&gt;&lt;P&gt;Unfortunately this is not an option for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what could be the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v.10 SR4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Nov 2012 10:28:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-05T10:28:21Z</dc:date>
    <item>
      <title>Problems getting set analysis working correctly with variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-getting-set-analysis-working-correctly-with-variable/m-p/401072#M149252</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 some problem getting a set analysis expression to work when using a variable.&lt;/P&gt;&lt;P&gt;My expression looks like this:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Product={$(vProduct)}&amp;gt;} Output) &lt;/P&gt;&lt;P&gt;and the variable can take on two different values, W12V32 and 9R32.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the variable takes on value W12V32 the expression above works fine, however if the variable takes on the value 9R32 it does not work.&lt;/P&gt;&lt;P&gt;However, the expression works fine if i hardcode it like this:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Product={'9R32'}&amp;gt;} Output) &lt;/P&gt;&lt;P&gt;Unfortunately this is not an option for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So what could be the problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v.10 SR4&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 10:28:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-getting-set-analysis-working-correctly-with-variable/m-p/401072#M149252</guid>
      <dc:creator />
      <dc:date>2012-11-05T10:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problems getting set analysis working correctly with variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-getting-set-analysis-working-correctly-with-variable/m-p/401073#M149253</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try embedding your variable expansion into single quotes:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Product={'$(vProduct)'}&amp;gt;} Output)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And check if the dollar sign expansion returns the result you expect (e.g. by not setting a label for the expression, so you get the expanded expression shown in your chart as label).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 10:34:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-getting-set-analysis-working-correctly-with-variable/m-p/401073#M149253</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-05T10:34:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problems getting set analysis working correctly with variable?</title>
      <link>https://community.qlik.com/t5/QlikView/Problems-getting-set-analysis-working-correctly-with-variable/m-p/401074#M149254</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked the label and it said:&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Product={9R32}&amp;gt;} Output)&lt;/P&gt;&lt;P&gt;I changed the variable so that it took on the value of '" 9R32 "' (i.e. both single and double quotes, double on the inside).&lt;/P&gt;&lt;P&gt;The label then changed to &lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Product={"9R32"}&amp;gt;} Output)&lt;/P&gt;&lt;P&gt;and the expression started working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried using two single quotes (i.e. ''9R32'') but that did not work. Well newermind, main thing is that it works (Just thought that it would have been more coherent).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Nov 2012 11:29:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problems-getting-set-analysis-working-correctly-with-variable/m-p/401074#M149254</guid>
      <dc:creator />
      <dc:date>2012-11-05T11:29:14Z</dc:date>
    </item>
  </channel>
</rss>

