<?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 Help With Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879439#M1012070</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking for some Set Analysis experts please&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can someone tell me what is wrong with this expression please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Money(sum({1&amp;lt;Year(LOAD_DATE)={"$(=Year(Today()-10))"}&amp;gt;}(POSTED_DEBIT-POSTED_CREDIT)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just cannot see what is wrong with this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although the expression builder says "Expression OK", I am getting the error "Error: Error in set modifier expression"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 May 2015 12:58:07 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-05-05T12:58:07Z</dc:date>
    <item>
      <title>Help With Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879439#M1012070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking for some Set Analysis experts please&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please can someone tell me what is wrong with this expression please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Money(sum({1&amp;lt;Year(LOAD_DATE)={"$(=Year(Today()-10))"}&amp;gt;}(POSTED_DEBIT-POSTED_CREDIT)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just cannot see what is wrong with this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although the expression builder says "Expression OK", I am getting the error "Error: Error in set modifier expression"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 12:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879439#M1012070</guid>
      <dc:creator />
      <dc:date>2015-05-05T12:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Help With Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879440#M1012071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi John,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set analysis needs to be based on real fields, so using Year(LOAD_DATE) as a modifier won't work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you create a year field in your model, you can then use that&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;year(LOAD_DATE) as LOAD_YEAR&lt;/P&gt;&lt;P&gt;in the script&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then expression&lt;/P&gt;&lt;P&gt;&lt;EM style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Money(sum({1&amp;lt;LOAD_YEAR={"$(=Year(Today()-10))"}&amp;gt;}(POSTED_DEBIT-POSTED_CREDIT)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope that helps&lt;/P&gt;&lt;P&gt;Joe&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 13:04:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879440#M1012071</guid>
      <dc:creator />
      <dc:date>2015-05-05T13:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: Help With Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879441#M1012072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=Money(sum({1&amp;lt;&lt;SPAN style="color: #ff0000;"&gt;Year(LOAD_DATE)&lt;/SPAN&gt;={"$(=Year(Today()-10))"}&amp;gt;}(POSTED_DEBIT-POSTED_CREDIT)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The highlighted part is the one causing issue. You can't compare a calculated dimension/field in set analysis. You can only use script generated fields in set comparison (left hand side of '=' sign).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 13:05:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879441#M1012072</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2015-05-05T13:05:14Z</dc:date>
    </item>
    <item>
      <title>Re: Help With Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879442#M1012073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The LHS of a set expression can only be a field name, not an expression. I would define a year field in the load script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; LOAD ....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(LOAD_DATE) As LoadYear,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Money(sum({1&amp;lt;LoadYear = {"$(=Year(Today()-10))"}&amp;gt;} (POSTED_DEBIT-POSTED_CREDIT)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 13:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879442#M1012073</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2015-05-05T13:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Help With Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879443#M1012074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also rather than using the two fields in the sum, you might want to consider doing that in the script also and then the sum can be based on a single field. Just makes it performan better on the front end that way&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 13:06:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879443#M1012074</guid>
      <dc:creator />
      <dc:date>2015-05-05T13:06:35Z</dc:date>
    </item>
    <item>
      <title>Re: Help With Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879444#M1012075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks VERY much everyone, great answers very clear, and MUCH appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2015 13:17:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-With-Set-Analysis/m-p/879444#M1012075</guid>
      <dc:creator />
      <dc:date>2015-05-05T13:17:23Z</dc:date>
    </item>
  </channel>
</rss>

