<?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: Variable instead of Field in Set Analysis? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334703#M123378</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya &lt;STRONG&gt;Kiran&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, my variable is much more complicated than the example (&lt;EM&gt;above&lt;/EM&gt;) - and it also uses Set Analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;(If(Currency='Local', Sum({$&amp;lt;DateCourse_Year={$(uvCurrentYearMax)}&amp;gt;} M_Forecast),0)+&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;If(Currency='DKK', Sum({$&amp;lt;DateCourse_Year={$(uvCurrentYearMax)}&amp;gt;} M_Forecast_Dkk),0)+&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;If(Currency='EUR', Sum({$&amp;lt;DateCourse_Year={$(uvCurrentYearMax)}&amp;gt;} M_Forecast_Euro),0))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I will have a play using your suggestion above - although I am not entirely sure how it would apply to a Set Analysis formula?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, this formula may change in the future - thus I would like to reuse this code (ie: within the variable - rather than expanding the formula everywhere it is required).&amp;nbsp; If QlikView cannot make-use of reusing code then this is a very bad design flaw and quite disappointing&amp;nbsp; &lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate all your time and help, &lt;STRONG&gt;Kiran&lt;/STRONG&gt;, and I will post back with any findings.&amp;nbsp; In the meantime, if you (or anyone else!) has any further ideas please let me know!&amp;nbsp; &lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Jul 2012 08:57:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-09T08:57:24Z</dc:date>
    <item>
      <title>Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334697#M123372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As an example, instead of:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;sum&lt;/STRONG&gt;( &lt;/SPAN&gt;{$&amp;lt;Region = {UK}&amp;gt;} Sales&lt;SPAN class="Bold"&gt; )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="Bold"&gt;(Which will return the sum of the"Sales" field for the current selection, where the “Region” field is "UK").&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;SPAN class="Bold"&gt;Is it&lt;/SPAN&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt; possible to use a variable instead, like:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;SPAN class="Bold"&gt;&lt;STRONG&gt;sum&lt;/STRONG&gt;( &lt;/SPAN&gt;{$&amp;lt;Region = {UK}&amp;gt;} &lt;EM&gt;vSalesInLocalCurrency&lt;/EM&gt;&lt;SPAN class="Bold"&gt; )&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="Bold"&gt;(Which would return the sum of the &lt;SPAN style="text-decoration: underline;"&gt;calculated&lt;/SPAN&gt; variable"vSalesInLocalCurrency" (basically returning the same as "Sales" but as a currency conversion), where the “Region” field is "UK").&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;As I can't get this to work!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;Steve.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Bold"&gt;PS:&amp;nbsp; This is just an example - my variable is much more complex and so I can't do the caluculation 'afterwards', and I would like to be able to reuse my complex formula.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 16:52:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334697#M123372</guid>
      <dc:creator />
      <dc:date>2012-07-04T16:52:37Z</dc:date>
    </item>
    <item>
      <title>Re: Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334698#M123373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;$(='sum( {$&amp;lt;Region = {UK}&amp;gt;}'&amp;amp;vSalesInLocalCurrency&amp;amp;')')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Jul 2012 17:20:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334698#M123373</guid>
      <dc:creator />
      <dc:date>2012-07-04T17:20:14Z</dc:date>
    </item>
    <item>
      <title>Re: Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334699#M123374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya &lt;STRONG&gt;Kiran&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately this also produces the result "-".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cannot find any help on the syntax which you've used (&lt;EM&gt;above&lt;/EM&gt;) and so don't entirely understand what you're attempting to do (meaning that I can't think the process through myself!).&amp;nbsp; Would it be possible for you to explain the reasoning behind your (&lt;EM&gt;above&lt;/EM&gt;) formula? (ie: the use of "$" as the first character, the use of single-quotes ('), and the use of ampersands (&amp;amp;)...).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate all your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 08:55:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334699#M123374</guid>
      <dc:creator />
      <dc:date>2012-07-05T08:55:26Z</dc:date>
    </item>
    <item>
      <title>Re: Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334700#M123375</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We want to make a dynamic expression in the chart. Let me break the steps for this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a dynamic expression string (X)&lt;/P&gt;&lt;P&gt; 'sum( {$&amp;lt;Region = {UK}&amp;gt;}'&amp;amp;vSalesInLocalCurrency&amp;amp;')'&lt;/P&gt;&lt;P&gt;This step will create the string which we normally type out in the expression editor. Since its not static, we code it with some parameters in this case a variable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. Evaluate the string(X)&lt;/P&gt;&lt;P&gt;$(=X)&lt;/P&gt;&lt;P&gt;This would actually do the work once the expression is typed out.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why all this?:&lt;/P&gt;&lt;P&gt;Well, I dont know a better way.&lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this clarifies. Some earlier version didnt support this expression and hence we used to do step 1 in a variable and use step to in the expression editor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since this doesnt workout for you, can you try it by breaking in two steps? This is one done yesterday&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" class="loading" href="https://community.qlik.com/message/234514#234514" title="http://community.qlik.com/message/234514#234514"&gt;http://community.qlik.com/message/234514#234514&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry missed the last question&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 09:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334700#M123375</guid>
      <dc:creator />
      <dc:date>2012-07-05T09:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334701#M123376</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;Thanks &lt;STRONG&gt;Kiran&lt;/STRONG&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;Of course, this makes sense now&amp;nbsp; &lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;I am writing the formula within it's own User Variable - and I am able to evaluate a dynamic expression using a calculated User Variable field, eg:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN&gt;='Sum({$&amp;lt;Region={UK}&amp;gt;} ' &amp;amp; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;$(vSalesInLocalCurrency)&lt;/EM&gt;&lt;/STRONG&gt; &amp;amp; ')'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 8pt;"&gt;Gives the result (within a Text Object):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;Sum({$&amp;lt;Region={UK}&amp;gt;} &lt;STRONG&gt;1234567890&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt; font-family: arial,helvetica,sans-serif;"&gt;(Notice the missing close-parenthesis ")" at the end of the text output - ???).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;I have noticed that the following formula is evaluated "in-line":&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN&gt;='Sum({$&amp;lt;Region={UK}&amp;gt;} ' &amp;amp; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;vSalesInLocalCurrency&lt;/EM&gt;&lt;/STRONG&gt; &amp;amp; ')'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt; font-family: arial,helvetica,sans-serif;"&gt;(Notice the lack of "$()" around the Variable name).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;Which gives text output of:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;Sum({$&amp;lt;Region={UK}&amp;gt;} If(Currency='EUR', (Sales * 1.246), Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 8pt; font-family: arial,helvetica,sans-serif;"&gt;(Which displays the actual formula).&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;However, when attempting to evaluate either of these expressions as an actual forumula I get "-" (&lt;EM&gt;NULL&lt;/EM&gt;).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; font-size: 8pt;"&gt;eg:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;&lt;SPAN&gt;$(='Sum({$&amp;lt;Region={UK}&amp;gt;} ' &amp;amp; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;$(vSalesInLocalCurrency)&lt;/EM&gt;&lt;/STRONG&gt; &amp;amp; ')')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 8pt;"&gt;...and...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;$(='Sum({$&amp;lt;Region={UK}&amp;gt;} ' &amp;amp; &lt;STRONG&gt;&lt;EM&gt;vSalesInLocalCurrency&lt;/EM&gt;&lt;/STRONG&gt; &amp;amp; ')')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 8pt;"&gt;...both give the result &lt;EM&gt;NULL&lt;/EM&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 8pt;"&gt;Any ideas what I'm missing here?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 8pt;"&gt;Cheers,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #000000; font-size: 8pt;"&gt;Steve.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 10:07:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334701#M123376</guid>
      <dc:creator />
      <dc:date>2012-07-05T10:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334702#M123377</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you change the definition of &lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;vSalesInLocalCurrency&lt;/EM&gt;&lt;/STRONG&gt; &lt;/SPAN&gt; to &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;=If(Currency='EUR', 'Sales * 1.246','Sales')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Notice = in beginnering and true/false statements within quotes&lt;/EM&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using the first expression (with $).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Easeir way to do this is ingore all the previous and have your final expression as:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;Sum({$&amp;lt;Region={UK}&amp;gt;} Sales)*if(&lt;/SPAN&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif; color: #0000ff; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;vSalesInLocalCurrency&lt;/EM&gt;&lt;/STRONG&gt; ='EUR',1.246,1)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jul 2012 10:20:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334702#M123377</guid>
      <dc:creator />
      <dc:date>2012-07-05T10:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334703#M123378</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya &lt;STRONG&gt;Kiran&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, my variable is much more complicated than the example (&lt;EM&gt;above&lt;/EM&gt;) - and it also uses Set Analysis:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;(If(Currency='Local', Sum({$&amp;lt;DateCourse_Year={$(uvCurrentYearMax)}&amp;gt;} M_Forecast),0)+&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;If(Currency='DKK', Sum({$&amp;lt;DateCourse_Year={$(uvCurrentYearMax)}&amp;gt;} M_Forecast_Dkk),0)+&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff;"&gt;&lt;STRONG&gt;If(Currency='EUR', Sum({$&amp;lt;DateCourse_Year={$(uvCurrentYearMax)}&amp;gt;} M_Forecast_Euro),0))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I will have a play using your suggestion above - although I am not entirely sure how it would apply to a Set Analysis formula?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, this formula may change in the future - thus I would like to reuse this code (ie: within the variable - rather than expanding the formula everywhere it is required).&amp;nbsp; If QlikView cannot make-use of reusing code then this is a very bad design flaw and quite disappointing&amp;nbsp; &lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate all your time and help, &lt;STRONG&gt;Kiran&lt;/STRONG&gt;, and I will post back with any findings.&amp;nbsp; In the meantime, if you (or anyone else!) has any further ideas please let me know!&amp;nbsp; &lt;STRONG&gt;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 08:57:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334703#M123378</guid>
      <dc:creator />
      <dc:date>2012-07-09T08:57:24Z</dc:date>
    </item>
    <item>
      <title>Re: Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334704#M123379</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm not sure but the fact that you're doing summary at different levels with different set analysis seems not to be good.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you try this, create your variable (vSalesInLocalCurrency) with this formula but with no = sign at the beginning, just this text :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;{$&amp;lt;DateCourse_Year={$(uvCurrentYearMax)}&amp;gt;} If(Currency='Local',M_Forecast,If(Currency='DKK',M_Forecast_Dkk,M_Forecast_Euro))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in your expression :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum( {$&amp;lt;Region = {UK}&amp;gt;} $(vSalesInLocalCurrency) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial,helvetica,sans-serif;"&gt;Vincent&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 09:20:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334704#M123379</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2012-07-09T09:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334705#M123380</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Steve,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is an usual thing I do. I am not sure why this is not working for you. Before putting it to an expression we need to test the string. For this create a text box with the string and validate the syntax against what is expected for different variable results. If the expression string is right, we will move to the next step. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='Sum({&amp;lt;Region={"UK"}&amp;gt;} '&amp;amp;vSalesInLocalCurrency&amp;amp;')'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kiran Rokkam.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Jul 2012 16:14:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334705#M123380</guid>
      <dc:creator />
      <dc:date>2012-07-09T16:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: Variable instead of Field in Set Analysis?</title>
      <link>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334706#M123381</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hiya &lt;STRONG&gt;Vincent&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This has worked for me - thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It appears the main point of my problem was that, when using Set Analysis, the formula expects a "&lt;EM&gt;field&lt;/EM&gt;" rather than a calculated number (even though using a static number such as "&lt;STRONG&gt;1234567890&lt;/STRONG&gt;" would work!!!).&amp;nbsp; So by creating a User Variable that returned a "&lt;EM&gt;field&lt;/EM&gt;" it was accepted by the Set Analysis formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, I think that's how it works!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry, &lt;STRONG&gt;Kiran&lt;/STRONG&gt;, as mentioned above - I could get the expression to output correctly to a Text Object (minus the closing parenthesis!!! - ???) but any Set Analysis formula would fail when trying to use nested expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Jul 2012 13:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variable-instead-of-Field-in-Set-Analysis/m-p/334706#M123381</guid>
      <dc:creator />
      <dc:date>2012-07-10T13:31:15Z</dc:date>
    </item>
  </channel>
</rss>

