<?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 variable to change in Chronological Order - How? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455005#M435049</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;v_compare_start_date&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;STRONG&gt;v_start_date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,-3) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;same for other field&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jan 2018 10:26:44 GMT</pubDate>
    <dc:creator>zhadrakas</dc:creator>
    <dc:date>2018-01-12T10:26:44Z</dc:date>
    <item>
      <title>Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455004#M435048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a 2 Variables:&amp;nbsp; &lt;STRONG&gt;v_start_date&lt;/STRONG&gt; and &lt;STRONG&gt;v_end_date&lt;/STRONG&gt;, which I am using to enter dates in Calendar.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, I have two more variables: &lt;STRONG&gt;v_compare_start_date&lt;/STRONG&gt; and &lt;STRONG&gt;v_compare_end_date&lt;/STRONG&gt;, which has to change based on changes made in &lt;STRONG&gt;v_start_date&lt;/STRONG&gt; and &lt;STRONG&gt;v_end_date.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In Variable Event Trigger, OnChange action has been put for &lt;STRONG&gt;v_start_date &lt;/STRONG&gt;and &lt;STRONG&gt;v_end_date, &lt;/STRONG&gt;where &lt;STRONG&gt;v_compare_start_date&lt;/STRONG&gt; and &lt;STRONG&gt;v_compare_end_date &lt;/STRONG&gt;has to change chronologically based on given formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;Example&lt;/STRONG&gt; -&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;If I enter &lt;STRONG&gt;v_start_date = 10/01/2017&lt;/STRONG&gt; and &lt;STRONG&gt;v_end_date = 12/31/2017, &lt;/STRONG&gt;then &lt;STRONG&gt;v_compare_start_date &lt;/STRONG&gt;will become &lt;STRONG&gt;07/01/2017&lt;/STRONG&gt; and &lt;STRONG&gt;v_compare_end_date &lt;/STRONG&gt;will become &lt;STRONG&gt;09/30/2017.&lt;/STRONG&gt;&lt;/LI&gt;&lt;LI&gt;If I enter &lt;STRONG&gt;v_start_date = 12/16/2017&lt;/STRONG&gt; and &lt;STRONG&gt;v_end_date = 01/10/2018, &lt;/STRONG&gt;then &lt;STRONG&gt;v_compare_start_date &lt;/STRONG&gt;will become &lt;STRONG&gt;10/16/2017&lt;/STRONG&gt; and &lt;STRONG&gt;v_compare_end_date &lt;/STRONG&gt;will become &lt;STRONG&gt;11/10/2017&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;Question - &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;On OnChange variable event trigger, for &lt;STRONG&gt;v_start_date&lt;/STRONG&gt; and &lt;STRONG&gt;v_end_date, &lt;/STRONG&gt;what Variable values should I put for &lt;STRONG&gt;v_compare_start_date&lt;/STRONG&gt; and &lt;STRONG&gt;v_compare_end_date&lt;/STRONG&gt;, so to work correctly in Chronological Order, based on examples given above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jan 2018 22:15:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455004#M435048</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2018-01-11T22:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455005#M435049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;v_compare_start_date&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AddMonths&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;STRONG&gt;v_start_date&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,-3) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;same for other field&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 10:26:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455005#M435049</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2018-01-12T10:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455006#M435050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/216267"&gt;zhadrakas&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you. But this won't work if the Duration between Start Date and End Date is 1 Month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example -&lt;/P&gt;&lt;P&gt;v_start_date = 12/01/2017, v_end_date = 12/31/2017&lt;/P&gt;&lt;P&gt;v_compare_start_date should become 11/01/2017 and v_compare_end_date should become 11/30/2017&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on suggestion provided, above scenario won't work I guess.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jan 2018 14:03:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455006#M435050</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2018-01-12T14:03:55Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455007#M435051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any possible suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still trying to hold the values in variables and test. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jan 2018 16:33:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455007#M435051</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2018-01-15T16:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455008#M435052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dicky,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please clarify the logic between theses 2 set variables?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;because I didn't know why: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I enter &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;v_start_date = 12/16/2017&lt;/STRONG&gt; and &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;v_end_date = 01/10/2018, &lt;/STRONG&gt;then &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;v_compare_start_date &lt;/STRONG&gt;will become &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;10/16/2017&lt;/STRONG&gt; and &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;v_compare_end_date &lt;/STRONG&gt;will become &lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;11/10/2017&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Aiolos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 04:55:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455008#M435052</guid>
      <dc:creator>uacg0009</dc:creator>
      <dc:date>2018-01-16T04:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455009#M435053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Dicky,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;check the qvw. Hope that will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regard&lt;/P&gt;&lt;P&gt;tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 09:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455009#M435053</guid>
      <dc:creator>zhadrakas</dc:creator>
      <dc:date>2018-01-16T09:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455010#M435054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/216267"&gt;zhadrakas&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for the efforts and the qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But still it has a constraint (I guess that might be for a confusion in my scenario). If you select Start Date = 01.10.2017 (Oct 2017) and End Date = 16.01.2018 (Jan 2018), the Compare Dates are coming as 01.09.2017 and 16.12.2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It should not be the case. The Compare Dates have to be Chronological. Expected Compare Dates are 01.06.2017 (June 2017) and 16.09.2017 (Sep 2017).&lt;/P&gt;&lt;P&gt;So that the Months cover Chronologically. As the Start Date and End Date cover 3.5 months, the Compare Dates should go back to 3.5 months.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope I am clear this time. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 16:26:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455010#M435054</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2018-01-16T16:26:06Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455011#M435055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/138417"&gt;uacg0009&lt;/A&gt;‌,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Compare Date Months and the Entered Date Months have to be Chronological Order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Start Date and End Date has 2 months - Dec 2017 and Jan 2018, so the Compare Dates should have 2 months in order - Oct 2017 and Nov 2017. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 16:28:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455011#M435055</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2018-01-16T16:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455012#M435056</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;I was able to get the solution by doing like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Based on entered dates for v_start_date and v_end_date, I created a variable,&lt;/P&gt;&lt;P&gt;v_end_start_duration = (Month(v_end_date) - Month(v_start_date)) + 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The used the variable as a parameter to calculate the &lt;/P&gt;&lt;P&gt;v_start_date_compare = AddMonths(v_start_date , -v_duration)&lt;/P&gt;&lt;P&gt;v_end_date_compare = AddMonths(v_end_date , -v_duration)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this way, all the Date Months are in Chronological order now.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jan 2018 16:50:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455012#M435056</guid>
      <dc:creator>dmohanty</dc:creator>
      <dc:date>2018-01-16T16:50:00Z</dc:date>
    </item>
    <item>
      <title>Re: Date variable to change in Chronological Order - How?</title>
      <link>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455013#M435057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Dicky,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like what you want is :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;v_start_date&lt;/P&gt;&lt;P&gt;v_end_date&lt;/P&gt;&lt;P&gt;v_compare_start_date = AddMonths(v_start_date,Month(v_end_date) - Month(v_start_date))&lt;/P&gt;&lt;P&gt;v_compare_end_date = v_compare_start_date + v_start_date - v_end_date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I think, if you want to use them in some expressions, 2 variables is enough.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Aiolos&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jan 2018 02:42:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-variable-to-change-in-Chronological-Order-How/m-p/1455013#M435057</guid>
      <dc:creator>uacg0009</dc:creator>
      <dc:date>2018-01-17T02:42:36Z</dc:date>
    </item>
  </channel>
</rss>

