<?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: Problem with Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312545#M500670</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not use set analysis, use a calculated dimension and a variable containing the base year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would do this:&lt;/P&gt;&lt;P&gt;1 - create a variable vBaseYear&lt;/P&gt;&lt;P&gt;2 - create an input box for the variable&lt;/P&gt;&lt;P&gt;3 - create a chart calculated dimension as this (untested, check the parens):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =If(Year = vBaseYear, 'Y', If(Year = vBaseYear + 1, 'Y+1', If(Year &amp;gt; vBaseYear + 1, 'After', Null())))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should give you a dimension containing 'Y' for rows pertaining vBaseYear, 'Y+1' for the next one and 'After' for years in the future.&lt;/P&gt;&lt;P&gt;Selecting 'Ignore if value is null' will delete every row associated with years &amp;lt; vBaseYear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 May 2011 15:52:47 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-05-19T15:52:47Z</dc:date>
    <item>
      <title>Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312542#M500667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;I have a problem with Set analysis.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;﻿I try to calculate, in a pivot table, the sum of costs values (CO_INT_ACTUAL) for the selected year (Y), for the next year (Y+1), and for all the years after.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;My totals for columns "selected year" and "next year" and next year works using this formula.&lt;/SPAN&gt;&lt;/P&gt;&lt;SPAN style="font-size: 8pt;"&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;Year&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;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(=Only(Year)) &lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #800000; font-size: 8pt;"&gt;[CO_INT_ACTUAL] )&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt; &lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;P&gt;To calculate the sum for all the years after, i use this formula:&lt;EM style="color: #808080; font-size: 8pt;"&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt; &lt;/EM&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&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;Year&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;&lt;STRONG&gt;&lt;EM style="color: #808080; font-size: 8pt;"&gt;$(&amp;gt;Only(Year+&lt;/EM&gt;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;EM style=": ; color: #808080; font-size: 8pt;"&gt;1))&lt;/EM&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[CO_INT_ACTUAL]&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-size: 8pt;"&gt;﻿&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;﻿But it doesn't work.&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;﻿Can anybody help me please?&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;﻿Thx,&lt;/P&gt;&lt;P&gt;﻿&lt;/P&gt;&lt;P&gt;﻿Greg&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 13:03:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312542#M500667</guid>
      <dc:creator />
      <dc:date>2011-05-19T13:03:46Z</dc:date>
    </item>
    <item>
      <title>Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312543#M500668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Not sure if I understood the dynamic of the user selections in your case, &lt;/P&gt;&lt;P&gt;but from a syntax point of view, your expression should be more like this: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Year={"&amp;gt;$(Only(Year)+1)"}&amp;gt;} [CO_INT_ACTUAL])&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Year={"&amp;gt;$(=Only(Year)+1)"}&amp;gt;} [CO_INT_ACTUAL]) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 13:14:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312543#M500668</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-05-19T13:14:48Z</dc:date>
    </item>
    <item>
      <title>Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312544#M500669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Greg,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try below syntax. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={$(=only(Year))}&amp;gt;}[CO_INT_ACTUAL])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={'&amp;gt;$(=only(Year)+1)'}&amp;gt;}[CO_INT_ACTUAL])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 13:45:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312544#M500669</guid>
      <dc:creator />
      <dc:date>2011-05-19T13:45:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312545#M500670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do not use set analysis, use a calculated dimension and a variable containing the base year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would do this:&lt;/P&gt;&lt;P&gt;1 - create a variable vBaseYear&lt;/P&gt;&lt;P&gt;2 - create an input box for the variable&lt;/P&gt;&lt;P&gt;3 - create a chart calculated dimension as this (untested, check the parens):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =If(Year = vBaseYear, 'Y', If(Year = vBaseYear + 1, 'Y+1', If(Year &amp;gt; vBaseYear + 1, 'After', Null())))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should give you a dimension containing 'Y' for rows pertaining vBaseYear, 'Y+1' for the next one and 'After' for years in the future.&lt;/P&gt;&lt;P&gt;Selecting 'Ignore if value is null' will delete every row associated with years &amp;lt; vBaseYear.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 May 2011 15:52:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312545#M500670</guid>
      <dc:creator />
      <dc:date>2011-05-19T15:52:47Z</dc:date>
    </item>
    <item>
      <title>Problem with Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312546#M500671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi Shyam,&lt;/P&gt;&lt;P&gt;thx a lot for the good Syntax. In my Set Analysis User Guide, there are no quotes in the formula...&lt;/P&gt;&lt;P&gt;Thanks Chiesa and Erich for your answers (i didn't need to test it but they are probably good too).&lt;/P&gt;&lt;P&gt;Bye ;-))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2011 12:13:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-Set-Analysis/m-p/312546#M500671</guid>
      <dc:creator />
      <dc:date>2011-05-20T12:13:07Z</dc:date>
    </item>
  </channel>
</rss>

