<?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 Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574319#M213925</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;Is there any relation between the years fields ? &lt;/P&gt;&lt;P&gt;It's possible that for example R_YEAR=2011 selection cuts the dataset so that there is no any To_YEAR=2013 records, but there are To_YEAR=2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this:&lt;/P&gt;&lt;P&gt;sum( {&amp;lt;[To_YEAR] = {'$(=max([R_YEAR]+2))'},POL_TYPE={'R'},&lt;STRONG&gt;[R_YEAR]=&lt;/STRONG&gt;&amp;gt;} [PREMIUM] )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Feb 2014 18:20:45 GMT</pubDate>
    <dc:creator>whiteline</dc:creator>
    <dc:date>2014-02-12T18:20:45Z</dc:date>
    <item>
      <title>Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574313#M213919</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;H5&gt;sum( {&amp;lt;[To_YEAR] = {'$(=max([R_YEAR]+1))'},POL_TYPE={'R'}&amp;gt;} [PREMIUM] )&lt;/H5&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two date fields in my module&amp;nbsp; To_Year&amp;nbsp; and R_Year. When I select R_Year and apply above expression calculation is done correctly. That is&amp;nbsp; To_Year=2013&amp;nbsp;&amp;nbsp; Selected R_year=2012&lt;/P&gt;&lt;P&gt;But if modify the above expression to add 2 years to R_year It does not work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;H5&gt;sum( {&amp;lt;[To_YEAR] = {'$(=max([R_YEAR]&lt;SPAN style="color: #ff0000;"&gt;+2&lt;/SPAN&gt;))'},POL_TYPE={'R'}&amp;gt;} [PREMIUM] )&lt;/H5&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me solve the above problem&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 10:25:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574313#M213919</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2014-02-12T10:25:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574314#M213920</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are To_Year and R_YEAR related (through data or any table ) ?&lt;/P&gt;&lt;P&gt;Is it possible that you have data with To_Year=2012 and R_YEAR = 2010 ?&lt;/P&gt;&lt;P&gt;Did you meet the maximum of To_Year (is it a valid value) ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fabrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 10:43:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574314#M213920</guid>
      <dc:creator />
      <dc:date>2014-02-12T10:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574315#M213921</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;Does the [To_YEAR] contains the corresponding years ?&lt;/P&gt;&lt;P&gt;It seems that for +2 you should select 2011.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 10:45:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574315#M213921</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-02-12T10:45:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574316#M213922</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;If you select R_Year=2012 then the set analysis return To_Year = 2014. If 2014 is not present in your dataset, it won't work.&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 10:52:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574316#M213922</guid>
      <dc:creator>agilos_mla</dc:creator>
      <dc:date>2014-02-12T10:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574317#M213923</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To_Year and R_Year are from two Master Calenders and relates to Data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 10:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574317#M213923</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2014-02-12T10:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574318#M213924</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;All years are present in my data set Even if I select 2010 as R _year it is not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 11:12:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574318#M213924</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2014-02-12T11:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574319#M213925</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;Is there any relation between the years fields ? &lt;/P&gt;&lt;P&gt;It's possible that for example R_YEAR=2011 selection cuts the dataset so that there is no any To_YEAR=2013 records, but there are To_YEAR=2012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this:&lt;/P&gt;&lt;P&gt;sum( {&amp;lt;[To_YEAR] = {'$(=max([R_YEAR]+2))'},POL_TYPE={'R'},&lt;STRONG&gt;[R_YEAR]=&lt;/STRONG&gt;&amp;gt;} [PREMIUM] )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Feb 2014 18:20:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Expression/m-p/574319#M213925</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-02-12T18:20:45Z</dc:date>
    </item>
  </channel>
</rss>

