<?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: Filtering script by date in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548687#M39519</link>
    <description>&lt;P&gt;great!!! thank's for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 25 Feb 2019 12:18:42 GMT</pubDate>
    <dc:creator>ecabanas</dc:creator>
    <dc:date>2019-02-25T12:18:42Z</dc:date>
    <item>
      <title>Filtering script by date</title>
      <link>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548659#M39515</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to load certain amount of data from our Netsuite data base, but I could not reach it, any idea what I'm doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;PRE&gt;NSTransactions:
LOAD 
CREATED_FROM_ID,
TRANDATE,
year(TRANDATE) as year_trandate,
TRANSACTION_EXTID,
TRANSACTION_ID,
TRANSACTION_TYPE,
ENTITY_ID,
If(Left([TRANSACTION_EXTID], 3)='FV0',
Replace([TRANSACTION_EXTID], 'FV', 'PV'),
Replace([TRANSACTION_EXTID], 'FV', 'PR')) as SalesId,
XBASEAMT1+XBASEAMT2+XBASEAMT3+XBASEAMT4 as Bruto_Fra;
SQL SELECT 
CREATED_FROM_ID,
TRANDATE,
TRANSACTION_EXTID,
TRANSACTION_ID,
TRANSACTION_TYPE,
ENTITY_ID,
XBASEAMT1,XBASEAMT2,XBASEAMT3,XBASEAMT4
FROM "ULABOX, S_L_".Administrator.TRANSACTIONS
Where 
Date(Floor(TRANDATE)) &amp;gt;= MakeDate(2017,01,01) and Date(Floor(TRANDATE)) &amp;lt;= MakeDate(2017,12,31);&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error message" style="width: 551px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/6676i28C3F8025B55ABCE/image-size/large?v=v2&amp;amp;px=999" role="button" title="2019-02-25_12h27_29.png" alt="error message" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;error message&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 11:28:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548659#M39515</guid>
      <dc:creator>ecabanas</dc:creator>
      <dc:date>2019-02-25T11:28:25Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering script by date</title>
      <link>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548671#M39516</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the issue here is that your WHERE clause, which is being sent to SQL, is using Qlik syntax&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where&lt;BR /&gt;Date(Floor(TRANDATE)) &amp;gt;= MakeDate(2017,01,01) and Date(Floor(TRANDATE)) &amp;lt;= MakeDate(2017,12,31);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Change this to&lt;/P&gt;&lt;P&gt;Where&lt;BR /&gt;TRANDATE &amp;gt;= '2017-01-01' and TRANDATE &amp;lt;= '2017-12-31';&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 11:43:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548671#M39516</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2019-02-25T11:43:27Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering script by date</title>
      <link>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548681#M39517</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/32138"&gt;@marcus_malinow&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank's for your help, now it works, but just one more question, how could I make these dates dynamically? for example, I want to load current month and store previous&amp;nbsp;month in a QVD, fully auto depending on the date, if it's day number 10 of the month, store the previous and only oad the current one...any idea how to do that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank's again&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 12:03:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548681#M39517</guid>
      <dc:creator>ecabanas</dc:creator>
      <dc:date>2019-02-25T12:03:58Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering script by date</title>
      <link>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548684#M39518</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;you can pass in your dates via variables&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;before your LOAD:&lt;/P&gt;&lt;P&gt;LET vStartDate = date([whatever your expression is to determine start date], 'YYYY-MM-DD');&lt;/P&gt;&lt;P&gt;LET vEndDate = date([whatever your expression is to determine end date], 'YYYY-MM-DD');&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in your WHERE clause:&lt;/P&gt;&lt;P&gt;Where&lt;BR /&gt;TRANDATE &amp;gt;= '$(vStartDate)' and TRANDATE &amp;lt;= '$(vEndDate)';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 12:12:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548684#M39518</guid>
      <dc:creator>marcus_malinow</dc:creator>
      <dc:date>2019-02-25T12:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering script by date</title>
      <link>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548687#M39519</link>
      <description>&lt;P&gt;great!!! thank's for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Feb 2019 12:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Filtering-script-by-date/m-p/1548687#M39519</guid>
      <dc:creator>ecabanas</dc:creator>
      <dc:date>2019-02-25T12:18:42Z</dc:date>
    </item>
  </channel>
</rss>

