<?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 in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640411#M476755</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello together,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks for all of your help. All answers were helpful but I contacted our consultant in the meantime and got a solution. As you might be interested I post it here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possibility 1:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vRevenueTotalMax&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = 'sum({$&amp;lt;FYear ={' &amp;amp; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;chr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(36) &amp;amp; '(=Max(FYear))}, OrderPhase_Desc = {''Revenue''}&amp;gt;} NettAmount$(vCurrency))';&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Possibility 2:&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;let vRevenueTotalMax = 'sum({$&amp;lt;FYear ={' &amp;amp; chr(36) &amp;amp; '(=Max(FYear))}, OrderPhase_Desc = {' &amp;amp; chr(39) &amp;amp; 'Revenue' &amp;amp; chr(39) &amp;amp; '}&amp;gt;} NettAmount$(vCurrency))'; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The reason seemed to be that for some reason inspite of the set statement Qlik View calculated the formula directly when running the script. This always caused an "internal error". So the solution was to use a let statement instead and link the part with "&amp;amp;" as you can see from above. Now I´m able to maintain these formulas in the script and use it for several charts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks once more for all of your kind help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Carolin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 May 2014 15:29:48 GMT</pubDate>
    <dc:creator>carolin01</dc:creator>
    <dc:date>2014-05-22T15:29:48Z</dc:date>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640391#M476735</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;Could anybody help me to correct my variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vRevenueTotalMax&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = sum({$&amp;lt;FYear = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=Max(FYear))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, OrderPhase_Desc = {Revenue}&amp;gt;} NettAmount&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vCurrency)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I would like to see the Revenue for the Maximum Year that I choose from a List box. But it´s not calculating anything. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;It´s for sure something about brackets etc or similar...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Many thanks for your comments. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Carolin &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:34:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640391#M476735</guid>
      <dc:creator>carolin01</dc:creator>
      <dc:date>2014-05-20T14:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640392#M476736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is NettAmount$(vCurrency) supposed to read as NetAmount$(vCurrency)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:36:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640392#M476736</guid>
      <dc:creator />
      <dc:date>2014-05-20T14:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640393#M476737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum({$&amp;lt;FYear = {$(=Max(FYear))}, OrderPhase_Desc = {'Revenue'}&amp;gt;} NettAmount$(vCurrency));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Quotations around Revenue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:37:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640393#M476737</guid>
      <dc:creator />
      <dc:date>2014-05-20T14:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640394#M476738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quotation didn´t seem to help. This is a formula that I use which is working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; = sum({$&amp;lt;OrderPhase_Desc = {Revenue}&amp;gt;} NettAmount&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vCurrency)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Now it should include the Max-Year Term... &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:50:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640394#M476738</guid>
      <dc:creator>carolin01</dc:creator>
      <dc:date>2014-05-20T14:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640395#M476739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;NetAmount$(vCurrency) should be read as e.g. NetAmountEUR or NetAmountUSD&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:51:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640395#M476739</guid>
      <dc:creator>carolin01</dc:creator>
      <dc:date>2014-05-20T14:51:06Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640396#M476740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;vRevenueTotalMax&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; = sum({$&amp;lt;FYear = {&lt;/SPAN&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;Max(FYear)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}, OrderPhase_Desc = {Revenue}&amp;gt;} NettAmount&lt;/SPAN&gt;&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;$(vCurrency)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:52:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640396#M476740</guid>
      <dc:creator />
      <dc:date>2014-05-20T14:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640397#M476741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately not: this is how it´s looking like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: blue; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;sum&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: maroon; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;FYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt; = {Max(&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: maroon; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;FYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Arial','sans-serif'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;)}, OrderPhase_Desc = {Revenue}&amp;gt;} NettAmountUSD) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:55:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640397#M476741</guid>
      <dc:creator>carolin01</dc:creator>
      <dc:date>2014-05-20T14:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640398#M476742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sum&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;FYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #808080; font-size: 8pt;"&gt;&lt;EM&gt;&lt;EM&gt;$(=Max(FYear))&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;},OrderPhase_Desc={'Revenue'}&amp;gt;}NettAmount$(vCurrency)&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Just checking its not the current selections&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:57:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640398#M476742</guid>
      <dc:creator />
      <dc:date>2014-05-20T14:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640399#M476743</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #808080; font-size: 8pt; font-family: inherit; font-weight: inherit;"&gt;&lt;EM&gt;vRevenueTotalMax&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; = sum({$&amp;lt;FYear = {"&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #808080; font-size: 8pt; font-family: inherit; font-weight: inherit;"&gt;&lt;EM&gt;$(=Max(FYear))"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;}, OrderPhase_Desc = {'Revenue'}&amp;gt;} NettAmount&amp;amp;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #808080; font-size: 8pt; font-family: inherit; font-weight: inherit;"&gt;&lt;EM&gt;$(vCurrency)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;);&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:59:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640399#M476743</guid>
      <dc:creator>manideep78</dc:creator>
      <dc:date>2014-05-20T14:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640400#M476744</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: Arial, sans-serif; color: blue;"&gt;sum&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;FYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt; = {Max({$}&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: Arial, sans-serif; color: maroon;"&gt;FYear&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;)}, OrderPhase_Desc = {Revenue}&amp;gt;} NettAmountUSD) ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: Arial, sans-serif; color: black;"&gt;I feel like FYear = {Max(FYear)} does not consider the current selection, so maybe the above will work.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 14:59:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640400#M476744</guid>
      <dc:creator />
      <dc:date>2014-05-20T14:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640401#M476745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on format of your year (date?) consider the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;use the date function to give the set expression the string it is expecting using the dual date function&lt;/P&gt;&lt;P&gt;{&amp;lt;Month='$(=Date(AddMonths(Date#(Max([$(=Dimension)]),'YYYYM'),-1),'MMM-YY'))'&amp;gt;}&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 15:03:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640401#M476745</guid>
      <dc:creator>stigchel</dc:creator>
      <dc:date>2014-05-20T15:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640402#M476746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Unfortunately not - I maybe this information helps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working:&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;= sum({$&amp;lt;OrderPhase_Desc = {Revenue}&amp;gt;}&amp;nbsp;&amp;nbsp;&amp;nbsp; NettAmount&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="color: gray; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;$(vCurrency)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is not working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;= &lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;sum({$&amp;lt;FYear = {&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: maroon; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;"$(=Max(FYear))"&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;}&amp;gt;}&amp;nbsp; NettAmount&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN lang="EN-US" style="color: gray; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;$(vCurrency)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="color: black; font-family: 'Courier New'; font-size: 9pt; mso-ansi-language: EN-US; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 15:35:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640402#M476746</guid>
      <dc:creator>carolin01</dc:creator>
      <dc:date>2014-05-20T15:35:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640403#M476747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is your FYear a number? try MaxString(FYear)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 15:37:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640403#M476747</guid>
      <dc:creator />
      <dc:date>2014-05-20T15:37:05Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640404#M476748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Good question - I didn´t know it and tried but unfortunately it still didn´t work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 15:50:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640404#M476748</guid>
      <dc:creator>carolin01</dc:creator>
      <dc:date>2014-05-20T15:50:38Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640405#M476749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.800000190734863px;"&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; font-size: 12.800000190734863px;"&gt;does it works?&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; font-size: 12.800000190734863px;"&gt;= &lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;sum({$&amp;lt;FYear = {&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: maroon;"&gt;2014&lt;/SPAN&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;}&amp;gt;}&amp;nbsp; NettAmount&lt;/SPAN&gt;&lt;STRONG style="font-size: 12.800000190734863px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-family: inherit;"&gt;&lt;SPAN lang="EN-US" style="font-weight: inherit; font-style: inherit; font-size: 9pt; font-family: 'Courier New'; color: gray;"&gt;$(vCurrency)&lt;/SPAN&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN lang="EN-US" style="font-size: 9pt; font-family: 'Courier New'; color: black;"&gt;)&lt;/SPAN&gt;&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: 12.800000190734863px;"&gt;and what's the result of a textbox with?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #800000; font-size: 12px; font-family: 'Courier New';"&gt;=Max(FYear)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 16:27:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640405#M476749</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-20T16:27:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640406#M476750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Remove the label from your expression. Then hover over the column heading and you'll be able to see exactly how the expression is being expanded. That may provide a clue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 May 2014 16:32:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640406#M476750</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2014-05-20T16:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640407#M476751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;=Max ( FYear) gives me the maximum year from the selection that I do in a Listbox, which is correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is working, too:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {2014}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderPhase_Desc&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vOrderPhaseDesc)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;NettAmount&lt;/SPAN&gt;&lt;SPAN style="; color: #808080; font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;$(vCurrency)&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 08:17:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640407#M476751</guid>
      <dc:creator>carolin01</dc:creator>
      <dc:date>2014-05-21T08:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640408#M476752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;I think we are getting close now. In a textbox this is working and gives a correct result:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;=sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;FYear&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=Max(FYear))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;OrderPhase_Desc&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Revenue'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;NettAmount&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vCurrency)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I used this to set a variable:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; set &lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;vRevenueTotalMax&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; = sum({$&amp;lt;FYear = {&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(=Max(FYear))&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;}, OrderPhase_Desc = {'Revenue'}&amp;gt;} NettAmount&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;$(vCurrency)&lt;/EM&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt;); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I used the variable in a text box but the result is Null:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;=$(=vRevenueTotalMax) &lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 08:26:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640408#M476752</guid>
      <dc:creator>carolin01</dc:creator>
      <dc:date>2014-05-21T08:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640409#M476753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;- replace in working expression 2014 with &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 11.818181991577148px;"&gt;"$(=Max(FYear))"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- read Rob suggestion&lt;/P&gt;&lt;P&gt;- what's the expression expanded if you select year 2014, 2013, .....?&lt;/P&gt;&lt;P&gt;do you get 2014 for &lt;SPAN style="color: #800000; font-family: 'Courier New'; font-size: 11.818181991577148px;"&gt;"$(=Max(FYear))"&lt;/SPAN&gt; or what?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or post your doc&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 08:34:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640409#M476753</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2014-05-21T08:34:08Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640410#M476754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;TRY THIS &lt;/P&gt;&lt;P&gt;=&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;vRevenueTotalMax&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=$(&lt;STRONG style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;EM style="font-weight: inherit; font-size: 8pt; font-family: inherit; color: #808080;"&gt;vRevenueTotalMax&lt;/EM&gt;&lt;/STRONG&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 May 2014 08:36:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/640410#M476754</guid>
      <dc:creator>preminqlik</dc:creator>
      <dc:date>2014-05-21T08:36:54Z</dc:date>
    </item>
  </channel>
</rss>

