<?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: Date in Set Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-in-Set-Expression/m-p/591538#M219367</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you specify your question? What means "R" and "Month"? Would you like to add a value on your current month?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 16 Feb 2014 17:08:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-16T17:08:40Z</dc:date>
    <item>
      <title>Date in Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-Set-Expression/m-p/591535#M219364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In My attachment I have following dimension fields&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;R_Year,R_Month,To_Year, To_Month&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I select R_Year+2013 and R_Month=Jan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the following Results&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To_Year=R_Year+2 and To_Month=R_Month&amp;nbsp; and Trn_Type='R'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have written the following expression but it is not working&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum( {&amp;lt;[To_YEAR] = {$(=max([R_YEAR]+2))},POL_TYPE={'R'}&amp;gt;} [PREMIUM] )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls look into my attachment and correct it expression to suit my requirement&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Feb 2014 14:53:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-Set-Expression/m-p/591535#M219364</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2014-02-16T14:53:31Z</dc:date>
    </item>
    <item>
      <title>Re: Date in Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-Set-Expression/m-p/591536#M219365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Upali,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;your set expression is correct, but incomplete. The selection of R_YEAR was transfered to the Field "To_Year", but now you need to lock the possibiliy of the selection of your base fields R_YEAR and R_Month. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your actual expression, you limited your data modell (only datas where R_Year is 2013). In these activ datas is no information available that is associated with To_Year = 2015 (--&amp;gt; 2013+2). For To_Year = 2015, your field R_Year should be 2014.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;You could use two ways now to get the right values:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;1. Inactivate the selection of some field manually with "{&amp;lt;fieldname=,...&amp;gt;}" inside your set expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;sum( {&amp;lt;R_YEAR=,R_MONTH=, [To_MONTH] = {$(=concat([R_MONTH],','))},[To_YEAR] = {$(=max([R_YEAR]+2))},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;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;2. Inactivate the selection for every field with the pre-set "{1&amp;lt;...&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;sum( {1&amp;lt;[To_MONTH] = {$(=concat([R_MONTH],','))},[To_YEAR] = {$(=max([R_YEAR]+2))},POL_TYPE={'R'}&amp;gt;} [PREMIUM] )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;I'm using the second expression in projects, where I'm needing fixed selection structures without the ability of an interactive analysis. Because of the transferation of values from one field to an other&amp;nbsp; with a change of the value (in your case x+2), I would rec&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;ommend the second one for you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;The second tricky question is about the transfer of the values of the month. If you would just like to transfer one month from R_MONTH to RO_MONTH, you could use the set expression {&amp;lt;[To_MONTH] = {$(=only([R_MONTH]))}&amp;gt;}. The restriction is, that you have to select exactly one month everytime. I would recommend the set expression {&amp;lt;[To_MONTH] = {$(=concat([R_MONTH],','))}&amp;gt;} to transfer up to every month or only some &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;e.g. for Jan/May/Oct becomes the set expression the following value&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&amp;lt;[To_MONTH] = {1,5,10}&amp;gt;}&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;But be careful with this expression and non-numeric values.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Hope this will help you.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;Chris&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Feb 2014 15:39:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-Set-Expression/m-p/591536#M219365</guid>
      <dc:creator />
      <dc:date>2014-02-16T15:39:45Z</dc:date>
    </item>
    <item>
      <title>Re: Date in Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-Set-Expression/m-p/591537#M219366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your reply.But I want a little modification where R_Month=R+Month. Pls help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Feb 2014 16:04:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-Set-Expression/m-p/591537#M219366</guid>
      <dc:creator>upaliwije</dc:creator>
      <dc:date>2014-02-16T16:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: Date in Set Expression</title>
      <link>https://community.qlik.com/t5/QlikView/Date-in-Set-Expression/m-p/591538#M219367</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you specify your question? What means "R" and "Month"? Would you like to add a value on your current month?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 16 Feb 2014 17:08:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-in-Set-Expression/m-p/591538#M219367</guid>
      <dc:creator />
      <dc:date>2014-02-16T17:08:40Z</dc:date>
    </item>
  </channel>
</rss>

