<?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: CHANGE date dynamically in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210955#M626555</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure the SQL equivalent of this, but in QlikView you can use &lt;A href="https://community.qlik.com/qlik-blogpost/3037"&gt;IntervalMatch&lt;/A&gt; for handling this kind of situations&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 11 Oct 2016 10:25:50 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-10-11T10:25:50Z</dc:date>
    <item>
      <title>CHANGE date dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210951#M626551</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello guys,&lt;/P&gt;&lt;P&gt;I really need your help..&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&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; font-size: 13px;"&gt;I have a query that contains those fields :&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;SELECT&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;to_date('2016-09-26' ,'YYYY-MM-DD') as &lt;STRONG&gt;extract date&lt;/STRONG&gt;, &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;STRONG&gt;inv.billing_period&lt;/STRONG&gt;,&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(case when pt.segment_type is not null then payment.Total_payment else 0 end) as &lt;STRONG&gt;paid_amount,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(total_invoice_amount) as&lt;STRONG&gt; CA&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;from&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;.....&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;where to_date('2016-09-26' ,'YYYY-MM-DD') between cas.valid_from and cas.valid_to&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;and billing_period &amp;gt;='200305'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to execute this query so many times&amp;nbsp; to get a &lt;SPAN style="font-size: 13.3333px;"&gt;snapshot by changing the extract date&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the desirable result :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="140226" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/140226_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;for now I am doing like this in my script :&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;SELECT&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;to_date('2016-09-26' ,'YYYY-MM-DD') as &lt;STRONG&gt;extract date&lt;/STRONG&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;STRONG&gt;inv.billing_period&lt;/STRONG&gt;,&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(case when pt.segment_type is not null then payment.Total_payment else 0 end) as &lt;STRONG&gt;paid_amount,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(total_invoice_amount) as&lt;STRONG&gt; CA&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;from&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;.....&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;where to_date('2016-10-02' ,'YYYY-MM-DD') between cas.valid_from and cas.valid_to&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;and billing_period &amp;gt;='200305'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nocancatenate&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;SELECT&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;to_date('2016-09-30' ,'YYYY-MM-DD') as &lt;STRONG&gt;extract date&lt;/STRONG&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;STRONG&gt;inv.billing_period&lt;/STRONG&gt;,&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(case when pt.segment_type is not null then payment.Total_payment else 0 end) as &lt;STRONG&gt;paid_amount,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(total_invoice_amount) as&lt;STRONG&gt; CA&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;from&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;.....&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;where to_date('2016-09-30' ,'YYYY-MM-DD') between cas.valid_from and cas.valid_to&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;and billing_period &amp;gt;='200305'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;nocancatenate&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;SELECT&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;to_date('2016-10-02' ,'YYYY-MM-DD') as &lt;STRONG&gt;extract date&lt;/STRONG&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;STRONG&gt;inv.billing_period&lt;/STRONG&gt;,&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(case when pt.segment_type is not null then payment.Total_payment else 0 end) as &lt;STRONG&gt;paid_amount,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(total_invoice_amount) as&lt;STRONG&gt; CA&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;from&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;.....&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;where to_date('2016-10-02' ,'YYYY-MM-DD') between cas.valid_from and cas.valid_to&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;and billing_period &amp;gt;='200305'&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;How to do it dynamically ??&amp;nbsp; Any idea please?? do&amp;nbsp; have to create a loop??&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit;"&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 09:06:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210951#M626551</guid>
      <dc:creator>master_student</dc:creator>
      <dc:date>2016-10-11T09:06:38Z</dc:date>
    </item>
    <item>
      <title>Re: CHANGE date dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210952#M626552</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There must be a better way of structuring this.&lt;/P&gt;&lt;P&gt;Load all of your data, then calculate the to_date based on 'x'&lt;/P&gt;&lt;P&gt;I assume that your to_Date is always a sunday, so maybe create a calendar table and use that?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Sorry just going to a meeting or I would knock up an example.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 09:16:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210952#M626552</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-10-11T09:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: CHANGE date dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210953#M626553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to do a loop like that :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;date min=26092016&lt;/P&gt;&lt;P&gt;date max =01102016&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i between date min and date max&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;execute the query; the parametre i should change inside the query&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;SELECT&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;to_date('2016-10-02' ,'YYYY-MM-DD') as &lt;SPAN style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG&gt;extract date&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;STRONG&gt;inv.billing_period&lt;/STRONG&gt;&lt;/SPAN&gt;,&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(case when pt.segment_type is not null then payment.Total_payment else 0 end) as &lt;SPAN style="font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;STRONG&gt;paid_amount,&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;sum(total_invoice_amount) as&lt;SPAN style="font-style: inherit; font-size: 13px; font-family: inherit;"&gt;&lt;STRONG&gt; CA&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;from&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;.....&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;where to_date('2016-10-02' ,'YYYY-MM-DD') between cas.valid_from and cas.valid_to&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: small; font-family: arial, sans-serif; color: #222222;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13px; font-family: inherit;"&gt;and billing_period &amp;gt;='200305'&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 10:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210953#M626553</guid>
      <dc:creator>master_student</dc:creator>
      <dc:date>2016-10-11T10:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: CHANGE date dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210954#M626554</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That will still be quite inefficient as you are doing a round trip to the server for each record. This will be OK for a few records, but will be painfully slow even for a few hundreds of rows.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest that you look carefully at what&amp;nbsp; you are trying to achieve and create a (single) query that will fetch the payment amounts grouped by some sort of date. Although it looks like your problem is that the date field you require does not exist in the database. you may need to move some of the logic of selecting the dates to the SQL query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 10:23:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210954#M626554</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-10-11T10:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: CHANGE date dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210955#M626555</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure the SQL equivalent of this, but in QlikView you can use &lt;A href="https://community.qlik.com/qlik-blogpost/3037"&gt;IntervalMatch&lt;/A&gt; for handling this kind of situations&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 10:25:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210955#M626555</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-10-11T10:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: CHANGE date dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210956#M626556</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am doing this : but the result of the query is only one date 29-09-2016, I didn't get the other dates...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is there any pb with my script??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vDWDate ='2016-09-26';&lt;/P&gt;&lt;P&gt;LET vToday ='2016-10-02'; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do until vDWDate=vToday&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD *;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;select&amp;nbsp; &lt;/P&gt;&lt;P&gt;to_date('$(vDWDate)' ,'YYYY-MM-DD') , &lt;/P&gt;&lt;P&gt;inv.billing_period, &lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;from &lt;/P&gt;&lt;P&gt;..&lt;/P&gt;&lt;P&gt;&amp;nbsp; where to_date('$(vDWDate)' ,'YYYY-MM-DD') between cas.valid_from and cas.valid_to &lt;/P&gt;&lt;P&gt;&amp;nbsp; )BSeg&lt;/P&gt;&lt;P&gt;&amp;nbsp; and &lt;SPAN style="font-size: 10pt;"&gt; to_date(ip.Payment_Received_Date,'yyyy-mm-dd') &amp;lt;=to_date('$(vDWDate)' ,'YYYY-MM-DD')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;if vDWDate=vToday then&lt;/P&gt;&lt;P&gt;Exit Do;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 10:48:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210956#M626556</guid>
      <dc:creator>master_student</dc:creator>
      <dc:date>2016-10-11T10:48:25Z</dc:date>
    </item>
    <item>
      <title>Re: CHANGE date dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210957#M626557</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;I am doing this : but the result of the query is only one date 29-09-2016, I didn't get the other dates...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;is there any pb with my script??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Let vDWDate ='2016-09-26';&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LET vToday ='2016-10-02';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Do until vDWDate=vToday&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Temp:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD *;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;select &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;to_date('$(vDWDate)' ,'YYYY-MM-DD') ,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;inv.billing_period,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;...&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;from&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;..&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; where to_date('$(vDWDate)' ,'YYYY-MM-DD') between cas.valid_from and cas.valid_to&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; )BSeg&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp; and &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;to_date(ip.Payment_Received_Date,'yyyy-mm-dd') &amp;lt;=to_date('$(vDWDate)' ,'YYYY-MM-DD')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;if vDWDate=vToday then&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Exit Do;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;any idea please?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 11:59:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210957#M626557</guid>
      <dc:creator>master_student</dc:creator>
      <dc:date>2016-10-11T11:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: CHANGE date dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210958#M626558</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't see where you're increment your date in this?&lt;/P&gt;&lt;P&gt;You could also just use today() rather than loading it in a variable (I think)&lt;/P&gt;&lt;P&gt;You also need to dollar sign expand your comparison I think $(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DWDate)= today()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I still don't think you need to do this in your script, I think you can pull all the data and then use Qlik functionality to work out your intervals. Could you provide a sample of the data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 12:04:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210958#M626558</guid>
      <dc:creator>adamdavi3s</dc:creator>
      <dc:date>2016-10-11T12:04:51Z</dc:date>
    </item>
    <item>
      <title>Re: CHANGE date dynamically</title>
      <link>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210959#M626559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Adam,&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;My query returns the measures from the whole period (since 200301 until today)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the extract date to get a screenshot for all that period, for example extract date = today, the amount are different from the extract date 2016-09-26&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I am doing now is to join the queries and change the extract date&lt;/P&gt;&lt;P&gt;I would like to do it dynamically&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Oct 2016 14:33:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/CHANGE-date-dynamically/m-p/1210959#M626559</guid>
      <dc:creator>master_student</dc:creator>
      <dc:date>2016-10-11T14:33:15Z</dc:date>
    </item>
  </channel>
</rss>

