<?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 Trouble Using a Variable in Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170592#M504794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to try a combination of two of these tips: including the equals sign and using single quotes.&lt;/P&gt;&lt;P&gt;I would try:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;TextCount ({&amp;lt;FIELD_1= {'$(=vSelection)'}&amp;gt;}FIELD_2)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Also, I seem to recall some scrambling functionality in 8.5. I don't remember exactly how it worked. EDIT: It looks like it is the same as 9. Under document properties, there is a Scramble tab, which can be used to scramble certain fields. See section 1.13 of Book II of the Reference Manual.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2009 03:10:27 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-03T03:10:27Z</dc:date>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170585#M504787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a variable "vSelection" in my QVW, which is currently set to "USMC." Using a text box with the expression =$(vSelection), USMC appears as expected. The trouble comes when using the variable in set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This set analysis expression will work:&lt;/P&gt;&lt;P&gt;TextCount ({&amp;lt;FIELD_1= {USMC}&amp;gt;}FIELD_2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this one won't, even though I've confirmed above that $(vSelection) = USMC&lt;/P&gt;&lt;P&gt;TextCount ({&amp;lt;FIELD_1= {$(vSelection)}&amp;gt;}FIELD_2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2009 04:07:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170585#M504787</guid>
      <dc:creator />
      <dc:date>2009-08-29T04:07:58Z</dc:date>
    </item>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170586#M504788</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this in 8.5 SR5, and it worked beautifully.&lt;/P&gt;&lt;P&gt;Are you using V9?&lt;/P&gt;&lt;P&gt;The other thing you can try is putting quotes around the variable expansion, e.g.&lt;/P&gt;&lt;P&gt;TextCount ({&amp;lt;FIELD_1= {'$(vSelection)'}&amp;gt;}FIELD_2)&lt;/P&gt;&lt;P&gt;This will handle values with spaces correctly, although you should not need this for your specific example.&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 29 Aug 2009 06:56:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170586#M504788</guid>
      <dc:creator />
      <dc:date>2009-08-29T06:56:27Z</dc:date>
    </item>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170587#M504789</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working in 8.5. Unfortunately, the fix you suggest doesn't work. Any other idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 01:42:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170587#M504789</guid>
      <dc:creator />
      <dc:date>2009-09-02T01:42:14Z</dc:date>
    </item>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170588#M504790</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TextCount ({&amp;lt;FIELD_1= {$(=vSelection)}&amp;gt;}FIELD_2)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 02:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170588#M504790</guid>
      <dc:creator />
      <dc:date>2009-09-02T02:05:39Z</dc:date>
    </item>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170589#M504791</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Still nothing. Thanks for the effort. Any other syntax tweaks to try?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 03:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170589#M504791</guid>
      <dc:creator />
      <dc:date>2009-09-02T03:49:10Z</dc:date>
    </item>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170590#M504792</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This sounds like a bug to me. Can you provide the exact build or SR you are using, e.g. 8.50 SR4?&lt;/P&gt;&lt;P&gt;You could also try posting the document, and I would take a look at it for you. You should either remove (reduce data) or scramble the data prior to posting - or if you can create a sample, that would be helpful.&lt;/P&gt;&lt;P&gt;Phil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 04:13:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170590#M504792</guid>
      <dc:creator />
      <dc:date>2009-09-02T04:13:34Z</dc:date>
    </item>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170591#M504793</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Phil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The build info is: Client Build Number 8.50.6261.0409.2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As far as scrambling the data, I can do that to help with investigation if it is indeed a bug. Is there an easy way to scramble things in QV? Thanks for your interest in solving my problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 02:48:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170591#M504793</guid>
      <dc:creator />
      <dc:date>2009-09-03T02:48:54Z</dc:date>
    </item>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170592#M504794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may want to try a combination of two of these tips: including the equals sign and using single quotes.&lt;/P&gt;&lt;P&gt;I would try:&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;TextCount ({&amp;lt;FIELD_1= {'$(=vSelection)'}&amp;gt;}FIELD_2)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Also, I seem to recall some scrambling functionality in 8.5. I don't remember exactly how it worked. EDIT: It looks like it is the same as 9. Under document properties, there is a Scramble tab, which can be used to scramble certain fields. See section 1.13 of Book II of the Reference Manual.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 03:10:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170592#M504794</guid>
      <dc:creator />
      <dc:date>2009-09-03T03:10:27Z</dc:date>
    </item>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170593#M504795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Settings -&amp;gt; Document Properties -&amp;gt; Scrambling and then choose the fields to scramble.&lt;/P&gt;&lt;P&gt;Subject to size of the application it might make sense to reduce your data with filtering a few records and then under File -&amp;gt; Reduce Data -&amp;gt; Keep Possible Values and save your file&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2009 03:13:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170593#M504795</guid>
      <dc:creator>prieper</dc:creator>
      <dc:date>2009-09-03T03:13:44Z</dc:date>
    </item>
    <item>
      <title>Trouble Using a Variable in Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170594#M504796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One critical thing to remember when using a variable in set analysis is to ignore the selections which the user may make which influences the behaviour of the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example,&lt;/P&gt;&lt;P&gt;User makes selections on Year, and Month fields.&lt;/P&gt;&lt;P&gt;In your set analysis you want to create a formula to sum the previous month sales. If a user selects July and 2010, the vLM of June 2010, is not available in the SET. That is, unless you ignore the Year and Month selections.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of the formula:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Period = {'$(vLM)'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;You may need to write:&lt;/P&gt;&lt;P&gt;Sum({$&amp;lt;Year,Month,Period = {'$(vLM)'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is relevant for a connected date calendar and not a date island.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Sep 2010 09:31:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trouble-Using-a-Variable-in-Set-Analysis/m-p/170594#M504796</guid>
      <dc:creator />
      <dc:date>2010-09-08T09:31:49Z</dc:date>
    </item>
  </channel>
</rss>

