<?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 How to set  variable which will execute report 1 to 15 on 16 th and 1 to 30 / 31 /29 on start of the month in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-set-variable-which-will-execute-report-1-to-15-on-16-th/m-p/2157293#M93755</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;My ask is I have to schedule a report which will run on 16th of the month and on 1st or 2nd of&amp;nbsp; next moth.&lt;/P&gt;
&lt;P&gt;on 16th when report will run it holds data for 1 to 15 and when it executed on start of the month then it holds data for entire last month. I have tried it below way where i have set a 3 variables. But facing difficulty in writing in variable where&amp;nbsp; if day is 16 then last date is 15 and in start of the month last date should be either 30/31 or 29.&lt;/P&gt;
&lt;P&gt;1) Let vStartDate = date(floor(monthstart(addmonths(today(),-1))));&lt;/P&gt;
&lt;P&gt;2) Let vEndDate = date(floor(monthend(addmonths(today(),-1))));&lt;/P&gt;
&lt;P&gt;3) let vSdate = left(date(Today()),2);&lt;/P&gt;
&lt;P&gt;Start of the month is very much clear where i can take 1st variable but need help while setting "end date" variable.&lt;/P&gt;
&lt;P&gt;below given is the script where i am going to use these variable and need to have variable at '....' place&lt;/P&gt;
&lt;P&gt;DayName(PTRNEFF) &amp;gt;= '$(vStartDate)'&amp;nbsp;and DayName(PTRNEFF) &amp;lt;= ........&lt;BR /&gt;and date(date#(TRANSACTION_DATE,'YYMMDD'),'DD/MM/YYYY') &amp;gt;=&amp;nbsp;'$(vStartDate)'&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Jan 2024 07:15:56 GMT</pubDate>
    <dc:creator>P_Kale</dc:creator>
    <dc:date>2024-01-02T07:15:56Z</dc:date>
    <item>
      <title>How to set  variable which will execute report 1 to 15 on 16 th and 1 to 30 / 31 /29 on start of the month</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-set-variable-which-will-execute-report-1-to-15-on-16-th/m-p/2157293#M93755</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;My ask is I have to schedule a report which will run on 16th of the month and on 1st or 2nd of&amp;nbsp; next moth.&lt;/P&gt;
&lt;P&gt;on 16th when report will run it holds data for 1 to 15 and when it executed on start of the month then it holds data for entire last month. I have tried it below way where i have set a 3 variables. But facing difficulty in writing in variable where&amp;nbsp; if day is 16 then last date is 15 and in start of the month last date should be either 30/31 or 29.&lt;/P&gt;
&lt;P&gt;1) Let vStartDate = date(floor(monthstart(addmonths(today(),-1))));&lt;/P&gt;
&lt;P&gt;2) Let vEndDate = date(floor(monthend(addmonths(today(),-1))));&lt;/P&gt;
&lt;P&gt;3) let vSdate = left(date(Today()),2);&lt;/P&gt;
&lt;P&gt;Start of the month is very much clear where i can take 1st variable but need help while setting "end date" variable.&lt;/P&gt;
&lt;P&gt;below given is the script where i am going to use these variable and need to have variable at '....' place&lt;/P&gt;
&lt;P&gt;DayName(PTRNEFF) &amp;gt;= '$(vStartDate)'&amp;nbsp;and DayName(PTRNEFF) &amp;lt;= ........&lt;BR /&gt;and date(date#(TRANSACTION_DATE,'YYMMDD'),'DD/MM/YYYY') &amp;gt;=&amp;nbsp;'$(vStartDate)'&lt;/P&gt;
&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jan 2024 07:15:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-set-variable-which-will-execute-report-1-to-15-on-16-th/m-p/2157293#M93755</guid>
      <dc:creator>P_Kale</dc:creator>
      <dc:date>2024-01-02T07:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to set  variable which will execute report 1 to 15 on 16 th and 1 to 30 / 31 /29 on start of the month</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-set-variable-which-will-execute-report-1-to-15-on-16-th/m-p/2158472#M93877</link>
      <description>&lt;P&gt;As below, set variables in a conditional block&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;IF day(today())=1 THEN&lt;/P&gt;
&lt;P&gt;//Previous Monthend&lt;/P&gt;
&lt;P&gt;let vStartDate = MonthStart(Today(),-1);&lt;BR /&gt;let vEndDate =&amp;nbsp; &lt;SPAN&gt;MonthEnd(Today(),-1);&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;ElseIF day(today())&amp;gt;=16 THEN&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;//any day after 16th then; Current month 1st to 15th&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;let vStartDate = &lt;SPAN&gt;MonthStart(Today());&lt;/SPAN&gt;&lt;BR /&gt;let vEndDate = Date(&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;MonthStart(Today())+14&lt;/SPAN&gt;);&lt;/P&gt;
&lt;P&gt;End IF&lt;/P&gt;</description>
      <pubDate>Fri, 05 Jan 2024 03:58:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-set-variable-which-will-execute-report-1-to-15-on-16-th/m-p/2158472#M93877</guid>
      <dc:creator>vinieme12</dc:creator>
      <dc:date>2024-01-05T03:58:55Z</dc:date>
    </item>
  </channel>
</rss>

