<?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 including lastworkdate in a chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/including-lastworkdate-in-a-chart/m-p/1085230#M943506</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a chart based on a date and number of working days. What I would like to do is to show the initial date and all the subsequent days in a chart. Let's see and example: a person started to work on 15/10/2015 and worked for 5 days. If we use lastworkday function, it will return 21/10/2015. So, basically, I would like to see in a chart the days 15,16,19,20,21 which one person in each. The chart will have as Y axis for person and X axis for date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea? Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jan 2016 19:51:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-01-13T19:51:17Z</dc:date>
    <item>
      <title>including lastworkdate in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/including-lastworkdate-in-a-chart/m-p/1085230#M943506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a chart based on a date and number of working days. What I would like to do is to show the initial date and all the subsequent days in a chart. Let's see and example: a person started to work on 15/10/2015 and worked for 5 days. If we use lastworkday function, it will return 21/10/2015. So, basically, I would like to see in a chart the days 15,16,19,20,21 which one person in each. The chart will have as Y axis for person and X axis for date. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have an idea? Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2016 19:51:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/including-lastworkdate-in-a-chart/m-p/1085230#M943506</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-13T19:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: including lastworkdate in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/including-lastworkdate-in-a-chart/m-p/1085231#M943507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;an idea&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;IMG alt="1.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/111557_1.png" style="height: auto; width: auto;" /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;// some test data&lt;EM&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;AA:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load *, &lt;STRONG&gt;LastWorkDate&lt;/STRONG&gt;(startdate, days) as enddate inline [&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;person, startdate, days&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;A, 01/01/2016, 5&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;B, 02/01/2016, 6&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;C, 03/01/2016, 7&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;D, 15/10/2015, 5&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;];&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// make all dates&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Left Join (AA)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; person, &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; startdate,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; date(startdate + IterNo() -1) as date&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident AA&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;While startdate + iterno() -1 &amp;lt;= enddate;&amp;nbsp; &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// add flag for mon...fri&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Left join (AA)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;load&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; person, date,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; if(not match(num(WeekDay(date)), 5,6),1) as flagworking&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Resident AA;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jan 2016 21:32:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/including-lastworkdate-in-a-chart/m-p/1085231#M943507</guid>
      <dc:creator>maxgro</dc:creator>
      <dc:date>2016-01-13T21:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: including lastworkdate in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/including-lastworkdate-in-a-chart/m-p/1085232#M943508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks maxgro! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've made an expression in a chart because&amp;nbsp; the number of worked days can be editable and unfortunately it takes longer than i expect to show the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here is the function I've used: &lt;/P&gt;&lt;P&gt;count( distinct if(([Start Work Date]&amp;lt;=WORK_DAY and LastWorkDate([&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Start Work Date&lt;/SPAN&gt;], Round(([NofDays]/vNofDays),1))&amp;gt;=WORK_DAY), Person))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vNofDays is a variable which divides the number of worked days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I am finding a way to put this part in LOAD script: &lt;SPAN style="font-size: 13.3333330154419px;"&gt; LastWorkDate([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;Start Work Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;], Round(([NofDays]/vNofDays),1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and leaving &lt;SPAN style="font-size: 13.3333330154419px;"&gt;vNofDays as a inputfield. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 10:41:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/including-lastworkdate-in-a-chart/m-p/1085232#M943508</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-14T10:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: including lastworkdate in a chart</title>
      <link>https://community.qlik.com/t5/QlikView/including-lastworkdate-in-a-chart/m-p/1085233#M943509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to the problem, I found what is delaying calculation. This is the original function "&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;count( distinct if(([Start Work Date]&amp;lt;=WORK_DAY and LastWorkDate([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Start Work Date&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;], Round(([NofDays]/vNofDays),1))&amp;gt;=WORK_DAY), Person))&amp;nbsp;&amp;nbsp;&amp;nbsp; "&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and if I replace &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;LastWorkDate([&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;Start Work Date&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;], Round(([NofDays]/vNofDays),1)), by another field not editable ( [End Work Date]) the problem still occurs.&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: 12px; background-color: #f2f2f2;"&gt;So, If Statement is delaying to display chat. &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: 12px; background-color: #f2f2f2;"&gt;Does anyone have another way of doing that? &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jan 2016 19:02:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/including-lastworkdate-in-a-chart/m-p/1085233#M943509</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-01-14T19:02:07Z</dc:date>
    </item>
  </channel>
</rss>

