<?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/570897#M212728</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im supposing your To_Month and R_month fields are not in a date format, so doing &amp;gt;='Mar' doesnt work. You should change your To_Month field in your script like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month(date#(To_Month, 'MMM')) as To_Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then do the same for your R_month. Then you should be able to compare for '&amp;gt;='.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Feb 2014 17:11:30 GMT</pubDate>
    <dc:creator>jerem1234</dc:creator>
    <dc:date>2014-02-11T17:11:30Z</dc:date>
    <item>
      <title>Set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570892#M212723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;=sum( {&amp;lt;[To_YEAR] = {"$(=Only([R_YEAR]+1))"},[To_MONTH]={"$(=Only([R_MONTH]))"},POL_TYPE={'R'}&amp;gt;} [PREMIUM] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help me to modify this expression to show results To_MONTH &amp;gt;= R_MONTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum( {&amp;lt;[To_YEAR] = {"$(=Only([R_YEAR]+1))"},[To_MONTH]={"$(&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;&amp;gt;=&lt;/STRONG&gt;&lt;/SPAN&gt;Only([R_MONTH]))"},POL_TYPE={'R'}&amp;gt;} [PREMIUM] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written it like above but not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 16:34:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570892#M212723</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2014-02-11T16:34:40Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570893#M212724</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="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;=sum( {&amp;lt;[To_YEAR] = {"$(=Only([R_YEAR]+1))"},[To_MONTH]={"&lt;STRONG style="color: #ff0000;"&gt;&amp;gt;=&lt;/STRONG&gt;$(=&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Only([R_MONTH]))"},POL_TYPE={'R'}&amp;gt;} [PREMIUM] )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&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;"&gt;Hope this helps!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 16:37:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570893#M212724</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-02-11T16:37:53Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570894#M212725</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is not working&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 16:41:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570894#M212725</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2014-02-11T16:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570895#M212726</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do your values for R_Month look like and what is &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Only([R_MONTH])&lt;/SPAN&gt; supposed to return?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you posted your app or a sample app demonstrating your problem, I could help you more.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 16:46:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570895#M212726</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-02-11T16:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570896#M212727</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Suppose my To_Month= Jan&amp;nbsp; so when I select Jan as To_Month&amp;nbsp; the premium should be summed for the Months More than or equel to R_month. R_month is my Transaction month&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 16:54:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570896#M212727</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2014-02-11T16:54:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570897#M212728</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im supposing your To_Month and R_month fields are not in a date format, so doing &amp;gt;='Mar' doesnt work. You should change your To_Month field in your script like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Month(date#(To_Month, 'MMM')) as To_Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then do the same for your R_month. Then you should be able to compare for '&amp;gt;='.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 17:11:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570897#M212728</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-02-11T17:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570898#M212729</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But when I remove &amp;gt; sign it is working. It is a question of using &amp;gt;= instead of = sign&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 17:17:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570898#M212729</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2014-02-11T17:17:32Z</dc:date>
    </item>
    <item>
      <title>Re: Set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570899#M212730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;sum( {&amp;lt;[To_YEAR] = {'$(=max([R_YEAR])+1)'},[To_MONTH]={'&lt;STRONG&gt;&amp;gt;=&lt;/STRONG&gt;$(=&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;max([R_MONTH]))'},POL_TYPE={'R'}&amp;gt;} [PREMIUM] )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;regards.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 17:22:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570899#M212730</guid>
      <dc:creator />
      <dc:date>2014-02-11T17:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Set expression</title>
      <link>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570900#M212731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, when you use "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;$(=Only([R_MONTH]))", it probably returns a string like Mar. Then coupled with the quotes you have returns "Mar". Then with the set analysis, it goes through your field To_Month and matches the string value using the "=" sign. But when you are using the operators like &amp;gt;, &amp;lt;, &amp;gt;=, &amp;lt;=, you need number values to compare, not strings.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another attempt:&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;=sum( {&amp;lt;[To_YEAR] = {"$(=Only([R_YEAR]+1))"},[To_MONTH]={"&lt;STRONG style="font-style: inherit; font-family: inherit; color: #ff0000;"&gt;&amp;gt;=&lt;/STRONG&gt;$(=&lt;SPAN style="color: #ff0000;"&gt;num(&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Only([R_MONTH])&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;)"},POL_TYPE={'R'}&amp;gt;} [PREMIUM] )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that doesnt work, what you can do to test is put that expression in a straight table. Then if you don't touch the label, the formula should appear in your header for that column and then you can see what the set analysis is returning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know what it returns for &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;{"&lt;STRONG style="font-style: inherit; font-family: inherit; color: #ff0000;"&gt;&amp;gt;=&lt;/STRONG&gt;$(=&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Only([R_MONTH]))"} part in that header of your expression.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Find attached as example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Feb 2014 17:37:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-expression/m-p/570900#M212731</guid>
      <dc:creator>jerem1234</dc:creator>
      <dc:date>2014-02-11T17:37:14Z</dc:date>
    </item>
  </channel>
</rss>

