<?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 filtered dynamic update in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Date-filtered-dynamic-update/m-p/1000494#M647297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post the QVW and associated data file. &lt;/P&gt;&lt;P&gt;Sure I'll post back my reply as script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Oct 2015 16:54:07 GMT</pubDate>
    <dc:creator>prabhu0505</dc:creator>
    <dc:date>2015-10-30T16:54:07Z</dc:date>
    <item>
      <title>Date filtered dynamic update</title>
      <link>https://community.qlik.com/t5/QlikView/Date-filtered-dynamic-update/m-p/1000493#M647296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my loading script, I loaded, among the others, two fields (see them in the script below):&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14462201458976089 jive_text_macro" jivemacro_uid="_14462201458976089"&gt;
&lt;P&gt;01.IncrementalLoadPreventivi:&amp;nbsp; &lt;BR /&gt;02.LOAD ...,&amp;nbsp; &lt;BR /&gt;03.&amp;nbsp;&amp;nbsp;&amp;nbsp; Num(0) AS "Status",&amp;nbsp; &lt;BR /&gt;04.&amp;nbsp;&amp;nbsp;&amp;nbsp; ...,&amp;nbsp; &lt;BR /&gt;05.&amp;nbsp;&amp;nbsp;&amp;nbsp; DATA AS "Data",&amp;nbsp; &lt;BR /&gt;06.&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&amp;nbsp; &lt;BR /&gt;07.FROM&amp;nbsp; &lt;BR /&gt;08....&amp;nbsp; &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The field 'Status' can be either 0 or 1 and is set by default to 0.&lt;BR /&gt;'Data' is a date field whose format, in the Excel source file, is 'DD/MM/YYYY'&lt;/P&gt;&lt;P&gt;I defined two variables 'vDataSuperioreCambioStato' and 'vDataInferioreCambioStato' that I can set in an Input table.&lt;BR /&gt;Those two variables are intended as two dates with format 'DD/MM/YYYY'; for instance, $(vDataInferioreCambioStato) = '23/05/2015' and $(vDataSuperioreCambioStato) = '30/06/2015'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to switch the value of Status (there might be more than one at a time), between 0 and 1, for those records whose 'Data' is included between $(vDataInferioreCambioStato) (lower bound) and $(vDataSuperioreCambioStato) (upper bound)&lt;/P&gt;&lt;P&gt;Therefore, I created a button with a Dynamic update action. The following is the statement I use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1446220172345514 jive_text_macro" jivemacro_uid="_1446220172345514" modifiedtitle="true"&gt;
&lt;P&gt;= If (&amp;nbsp; only ({$ &amp;lt; Data&amp;nbsp; = {"&amp;lt;=$(= Date#('$(vDataSuperioreCambioStato)', 'DD/MM/YYYY'))"} &amp;gt; *&lt;/P&gt;
&lt;P&gt;&amp;lt; Data&amp;nbsp; = {"&amp;gt;=$(=&amp;nbsp; Date#('$(vDataInferioreCambioStato)', 'DD/MM/YYYY'))"} &amp;gt; } Status),&lt;BR /&gt;'UPDATE *&lt;BR /&gt; SET Status = 0&lt;BR /&gt; Where Data &amp;lt;= Date#('$(vDataSuperioreCambioStato)', 'DD/MM/YYYY')&lt;BR /&gt; AND Data &amp;gt;= Date#('$(vDataInferioreCambioStato)', 'DD/MM/YYYY');'&lt;BR /&gt;&amp;nbsp; ,&lt;BR /&gt;'UPDATE *&lt;BR /&gt; SET Status = 1&lt;BR /&gt; Where Data &amp;lt;= Date#('$(vDataSuperioreCambioStato)', 'DD/MM/YYYY')&lt;BR /&gt; AND Data &amp;gt;= Date#('$(vDataInferioreCambioStato)', 'DD/MM/YYYY');'&lt;BR /&gt;&amp;nbsp; )&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need a statement that allows me to switch between 0 and 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a personal edition of QV11, so please don't post qvw files.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Nicolò.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 16:09:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-filtered-dynamic-update/m-p/1000493#M647296</guid>
      <dc:creator />
      <dc:date>2015-10-30T16:09:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date filtered dynamic update</title>
      <link>https://community.qlik.com/t5/QlikView/Date-filtered-dynamic-update/m-p/1000494#M647297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post the QVW and associated data file. &lt;/P&gt;&lt;P&gt;Sure I'll post back my reply as script.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Oct 2015 16:54:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-filtered-dynamic-update/m-p/1000494#M647297</guid>
      <dc:creator>prabhu0505</dc:creator>
      <dc:date>2015-10-30T16:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Date filtered dynamic update</title>
      <link>https://community.qlik.com/t5/QlikView/Date-filtered-dynamic-update/m-p/1000495#M647298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Saravana.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find in the attachment the QVW file as you requested, together with the input file.&lt;/P&gt;&lt;P&gt;It took me sometime to translate them into English, so that they could be more readabale.&lt;/P&gt;&lt;P&gt;Please, be awareyou need to change the path to the input file in the loading script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Nicolò.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 01 Nov 2015 11:59:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Date-filtered-dynamic-update/m-p/1000495#M647298</guid>
      <dc:creator />
      <dc:date>2015-11-01T11:59:55Z</dc:date>
    </item>
  </channel>
</rss>

