<?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: Include Data from Last Business Day in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58457#M3889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it simply changing it to:&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;Firstworkdate(today()-1,0,$(vHolidays)) , the example in Help infers the second parameter is an offset number of days from the Firstworkdate relative t the first parameter.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 20 Feb 2018 23:20:20 GMT</pubDate>
    <dc:creator>dwforest</dc:creator>
    <dc:date>2018-02-20T23:20:20Z</dc:date>
    <item>
      <title>Include Data from Last Business Day</title>
      <link>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58456#M3888</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a conundrum. I have a report that has been displaying data up to the previous business day. Within the calculations for my graph, I have just been using the firstworkdate() function, and so far, so good. However, yesterday was a holiday, and today is Tuesday, so I need it to display numbers as of last Friday. For motives of flexibility, I also want to be able to edit the view from the load script to be able to see things from today, the last business day (networkdate(today()-1,1,$(vHolidays))), or two business days ago (firstworkdate(today()-2,1,$(vHolidays))). Here's how I have it set up:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1. Holidays are defined in the script:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;HolidaysInline:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Load * Inline&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;[&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; HolidayDate&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; 1/1/2018&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; 1/15/2018&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; 2/19/2018&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; 5/28/2018&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; 7/4/2018&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; 9/3/2018&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; 11/22/2018&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; 11/23/2018&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; 12/25/2018&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;];&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;ConcatHolidays:&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Load&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&amp;nbsp; CHR(39) &amp;amp; Concat([HolidayDate],Chr(39)&amp;amp;','&amp;amp;Chr(39)) &amp;amp; CHR(39) as ConcatHolidays&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Resident HolidaysInline;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Drop Table HolidaysInline;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Let vHolidays = Peek('ConcatHolidays',0,'ConcatHolidays');&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Drop Table ConcatHolidays;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2. Within the load script, I limit my date file to include only the data up to a certain point:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;If(Date(Date)&amp;lt;=Firstworkdate(today()-1,1,$(vHolidays)) AND Year(Date)&amp;gt;=2017,Date) AS Date&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;In this case (because today is Tuesday and Monday was a Holiday), all data should be current as of Friday. &lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;This all seems like it would work just fine; however, with the above setup, data from Friday is not shown. The following graph displays number of leads for last week:&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;IMG alt="Leads.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/193978_Leads.JPG" style="height: 282px; width: 620px;" /&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;STRONG&gt;There should be 36 on Friday, 2/16/2018, but I can't get it to show up without changing the date limitations in the script and messing with the rest of the data.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;Any ideas why this would be happening?&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;The chart dimension is: [Date.autoCalendar.Date]&lt;/P&gt;&lt;P style="text-align: left;"&gt;The chart measure is: Sum([Total Leads])&lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;I appreciate the help. &lt;/P&gt;&lt;P style="text-align: left;"&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;Aaron Bishop&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 23:00:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58456#M3888</guid>
      <dc:creator>acbishop2</dc:creator>
      <dc:date>2018-02-20T23:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Include Data from Last Business Day</title>
      <link>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58457#M3889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it simply changing it to:&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;Firstworkdate(today()-1,0,$(vHolidays)) , the example in Help infers the second parameter is an offset number of days from the Firstworkdate relative t the first parameter.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 23:20:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58457#M3889</guid>
      <dc:creator>dwforest</dc:creator>
      <dc:date>2018-02-20T23:20:20Z</dc:date>
    </item>
    <item>
      <title>Re: Include Data from Last Business Day</title>
      <link>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58458#M3890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not sure but you can try today(1) to see if it makes the difference - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE cellspacing="0" class="TableStyle-tableGrid" style="margin-bottom: 15px; color: #0f0f0f; font-family: 'Open Sans', Arial, sans-serif; font-size: 14px; margin-right: auto;"&gt;&lt;TBODY style="border-top-width: 2px; border-top-color: #0f0f0f;"&gt;&lt;TR class="Body-Body1" style="border-bottom-width: 1px; border-bottom-color: #d5d5d5;"&gt;&lt;TD class="BodyI--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;Today( 0)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="BodyG--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;Returns the day of the last finished data load.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1" style="border-bottom-width: 1px; border-bottom-color: #d5d5d5;"&gt;&lt;TD class="BodyI--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;Today( 1)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="BodyG--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;When used in a visualization expression, this returns the day of the function call.&lt;/P&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;When used in a data load script, this returns the day when the current data load started.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR class="Body-Body1" style="border-bottom-width: 1px; border-bottom-color: #d5d5d5;"&gt;&lt;TD class="BodyC--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;&lt;SPAN class="Code" data-mc-conditions="Targets.NotToTranslate" style="font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; font-size: 12px;"&gt;Today( 2)&lt;/SPAN&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD class="BodyA--" style="padding: 7px; border: 1px solid #d5d5d5;"&gt;&lt;P style="font-size: inherit; margin: 0 0 5px;"&gt;Returns the day when the app was opened.&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Feb 2018 23:45:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58458#M3890</guid>
      <dc:creator>Digvijay_Singh</dc:creator>
      <dc:date>2018-02-20T23:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: Include Data from Last Business Day</title>
      <link>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58459#M3891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With 0 as the second parameter, no date is returned. I have tested it out by having no restrictions on my [Date] field in the script and creating a KPI box with your expression in it. No date is returned. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried inputting it straight into the script and it made all of my visualizations have errors. None of them displayed anything useful. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But perhaps I am misunderstanding. Please let me know if this is the case and you still stand by your answer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Aaron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 00:01:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58459#M3891</guid>
      <dc:creator>acbishop2</dc:creator>
      <dc:date>2018-02-21T00:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: Include Data from Last Business Day</title>
      <link>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58460#M3892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does your date field contain time? if so you may need to try:&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;If(Floor(Date)&amp;lt;=Firstworkdate(today()-1,1,$(vHolidays)) AND Year(Date)&amp;gt;=2017,Date) AS Date&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Feb 2018 00:19:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Include-Data-from-Last-Business-Day/m-p/58460#M3892</guid>
      <dc:creator>dwforest</dc:creator>
      <dc:date>2018-02-21T00:19:32Z</dc:date>
    </item>
  </channel>
</rss>

