<?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: Inject Variable into Set analyis in Featured Members</title>
    <link>https://community.qlik.com/t5/Featured-Members/Inject-Variable-into-Set-analyis/m-p/2034408#M72</link>
    <description>&lt;P&gt;You may apply:&lt;/P&gt;
&lt;P&gt;vVar:&amp;nbsp; = if(getselectedcount(YourField), ' ,Country = {'England'}', '');&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt; Product = {'Shoes'}&amp;nbsp; &amp;nbsp;&amp;amp; $(vVar) &amp;gt;} Sales)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Feb 2023 11:55:01 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2023-02-06T11:55:01Z</dc:date>
    <item>
      <title>Inject Variable into Set analyis</title>
      <link>https://community.qlik.com/t5/Featured-Members/Inject-Variable-into-Set-analyis/m-p/2034386#M71</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;I'm trying to inject a variable into a Master Item depending on selections.&lt;/P&gt;
&lt;P&gt;Ideally if no selection is made then the Master Item would be something like:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt; Product = {'Shoes'} &amp;gt;} Sales)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But should a certain selection is made then ideally the Master Item would look like:&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt; Product = {'Shoes'}&amp;nbsp; &amp;nbsp;&amp;amp; '$(vVar)' &amp;gt;} Sales)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The variable would look like :&lt;/P&gt;
&lt;P&gt;vVar = ' ,Country = {'England'}'&lt;/P&gt;
&lt;P&gt;This is wanted to avoid creating a number of master items which are identical except for one filter difference.&amp;nbsp; So when nothing is selection the vVar would be null.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 10:58:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Featured-Members/Inject-Variable-into-Set-analyis/m-p/2034386#M71</guid>
      <dc:creator>GrantSk</dc:creator>
      <dc:date>2023-02-06T10:58:45Z</dc:date>
    </item>
    <item>
      <title>Re: Inject Variable into Set analyis</title>
      <link>https://community.qlik.com/t5/Featured-Members/Inject-Variable-into-Set-analyis/m-p/2034408#M72</link>
      <description>&lt;P&gt;You may apply:&lt;/P&gt;
&lt;P&gt;vVar:&amp;nbsp; = if(getselectedcount(YourField), ' ,Country = {'England'}', '');&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt; Product = {'Shoes'}&amp;nbsp; &amp;nbsp;&amp;amp; $(vVar) &amp;gt;} Sales)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 11:55:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Featured-Members/Inject-Variable-into-Set-analyis/m-p/2034408#M72</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2023-02-06T11:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Inject Variable into Set analyis</title>
      <link>https://community.qlik.com/t5/Featured-Members/Inject-Variable-into-Set-analyis/m-p/2034531#M73</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/76148"&gt;@marcus&lt;/a&gt;&amp;nbsp;thanks for your reply.&amp;nbsp; This got me most of the way there .&amp;nbsp;In the master item I had to remove the &amp;amp;&amp;nbsp; for it to work:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt; Product = {'Shoes'}&amp;nbsp; &amp;nbsp;$(vVar) &amp;gt;} Sales)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;The variable I had to add Chr(39) to get the ' to show:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;vVar = If(getselectedcount(YourField),',Country&amp;nbsp;= {' &amp;amp; chr(39) &amp;amp; 'England' &amp;amp; chr(39) &amp;amp; '}', '')&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 15:44:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Featured-Members/Inject-Variable-into-Set-analyis/m-p/2034531#M73</guid>
      <dc:creator>GrantSk</dc:creator>
      <dc:date>2023-02-06T15:44:17Z</dc:date>
    </item>
  </channel>
</rss>

