<?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: Set analysis of a variable containing functions with other set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577351#M477689</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is possible but not in that way&lt;/P&gt;&lt;P&gt;With the sysntax I gav eyou try to substitute the businessUnit section with a variable ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;sum({$&amp;lt;Year={2014}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;BusinessUnit={$(varValue)}&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&amp;gt;} Sales) / sum({$&amp;lt;Year={2010}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;BusinessUnit={&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;{$(varValue)}&lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&amp;gt;} Costs)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 15 Apr 2014 08:03:48 GMT</pubDate>
    <dc:creator>alexandros17</dc:creator>
    <dc:date>2014-04-15T08:03:48Z</dc:date>
    <item>
      <title>Set analysis of a variable containing functions with other set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577346#M477684</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My first community post. Hope you can help me. I've received enourmous help from here merely by Googling. Great community!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;My problem&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I want to create a set analysis of a variable containing functions that includes other set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Example&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I have a defined variable:&lt;/STRONG&gt; that is &lt;EM&gt;&lt;STRONG&gt;vMySpecialMargin&lt;/STRONG&gt;&lt;/EM&gt; = sum({$&amp;lt;Year={2014}&amp;gt;} Sales) / sum({$&amp;lt;Year={2010}&amp;gt;} Costs)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do this in a chart expression: ={$&amp;lt;BusinessUnit={SecretServices}&amp;gt;} $(&lt;EM&gt;&lt;STRONG&gt;vMySpecialMargin&lt;/STRONG&gt;&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;That gives me nothing. It doesn't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;What I've already tried in the chart expression that doesn't work&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;={$&amp;lt;BusinessUnit={SecretServices}&amp;gt;} $(&lt;EM&gt;&lt;STRONG&gt;vMySpecialMargin&lt;/STRONG&gt;&lt;/EM&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;BusinessUnit={SecretServices}&amp;gt;} $(&lt;EM&gt;&lt;STRONG&gt;vMySpecialMargin&lt;/STRONG&gt;&lt;/EM&gt;))&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //The sum would be redundant, but i thought it might've helped with the set analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Is it possible to do this?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I use the function in the variable on a lot of places and when I need to tweek it it takes a lot of time as it is now. If I could put it in one common place for the charts and just change a customize a few set analysis code snippets once in each chart it would save me a lot of time and effort.&lt;/P&gt;&lt;P&gt;Of course my example is for silly data but it explains my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Rasmus Toivonen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 07:33:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577346#M477684</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-15T07:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis of a variable containing functions with other set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577347#M477685</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is what you need:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({$&amp;lt;Year={2014}, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;BusinessUnit={'SecretServices'}&lt;/SPAN&gt;&amp;gt;} Sales) / sum({$&amp;lt;Year={2010}, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;BusinessUnit={'SecretServices'}&lt;/SPAN&gt;&amp;gt;} Costs)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Let me know&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 07:37:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577347#M477685</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-04-15T07:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis of a variable containing functions with other set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577348#M477686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the super quick answer!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But... that is exactly the function I have in my expression now (but much more complex and with more set analysises.).&lt;/P&gt;&lt;P&gt;I wanted to lift out parts of the function into a variable and just change a part of the set analysis for each time I re-use the function/expression that I've moved to the variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to do this:&lt;/P&gt;&lt;P&gt;Chart 1: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;={$&amp;lt;BusinessUnit={SecretServices}&amp;gt;} $(&lt;/SPAN&gt;&lt;EM style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMySpecialMarginFunction&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Chart 2: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;={$&amp;lt;BusinessUnit={NavySeal}&amp;gt;} $(&lt;/SPAN&gt;&lt;EM style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMySpecialMarginFunction&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Chart 3: &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;={$&amp;lt;BusinessUnit={McRonald}&amp;gt;} $(&lt;/SPAN&gt;&lt;EM style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMySpecialMarginFunction&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;$(&lt;/SPAN&gt;&lt;EM style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMySpecialMarginFunction&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&gt;)&lt;/SPAN&gt; also has&amp;nbsp; its own set analysis in its definition.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 07:49:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577348#M477686</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-15T07:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis of a variable containing functions with other set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577349#M477687</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately the syntax is wrong, you have to insert the condition for &lt;STRONG style="color: #3d3d3d; background-color: #f6f6f6; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;BusinessUnit&lt;/STRONG&gt; in &lt;SPAN style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;$(&lt;/SPAN&gt;&lt;EM style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;vMySpecialMarginFunction&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 07:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577349#M477687</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-04-15T07:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis of a variable containing functions with other set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577350#M477688</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So basically it is not possible to do this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 07:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577350#M477688</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-15T07:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis of a variable containing functions with other set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577351#M477689</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is possible but not in that way&lt;/P&gt;&lt;P&gt;With the sysntax I gav eyou try to substitute the businessUnit section with a variable ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;sum({$&amp;lt;Year={2014}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;BusinessUnit={$(varValue)}&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&amp;gt;} Sales) / sum({$&amp;lt;Year={2010}, &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;BusinessUnit={&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;{$(varValue)}&lt;/SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f6f6f6;"&gt;&amp;gt;} Costs)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 08:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577351#M477689</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-04-15T08:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis of a variable containing functions with other set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577352#M477690</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't like 'not possible'. You can do that with multiple variables. Like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Var1 ='sum({$&amp;lt;Year={2014}'&lt;/P&gt;&lt;P&gt;Var2 ='&amp;gt;} Sales)'&lt;/P&gt;&lt;P&gt;Var3 =' / sum({$&amp;lt;Year={2010}'&lt;/P&gt;&lt;P&gt;Var4 ='&amp;gt;} Costs)'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now your expressions would be like:&lt;/P&gt;&lt;P&gt;=$(Var1) &amp;amp; ' ,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8px;"&gt;BusinessUnit={SecretServices}&lt;/SPAN&gt;' &amp;amp; $(Var2) &amp;amp; $(Var3) &amp;amp;&amp;nbsp; ' ,&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.8px;"&gt;BusinessUnit={SecretServices}&lt;/SPAN&gt;' &amp;amp; $(Var4)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Be careful of the commas.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and similarly for other expressions.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 08:06:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577352#M477690</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2014-04-15T08:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis of a variable containing functions with other set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577353#M477691</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for this!&lt;/P&gt;&lt;P&gt;Not exactly a "graceful" solution. But still a solution. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understand that it this wasn't solveable in a way as nice as I would've liked.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Apr 2014 08:49:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-of-a-variable-containing-functions-with-other-set/m-p/577353#M477691</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-04-15T08:49:10Z</dc:date>
    </item>
  </channel>
</rss>

