<?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: Average hours per workday in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577026#M546641</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;try this, &lt;SPAN class="Code"&gt;networkdays&lt;/SPAN&gt; returns the number of working days (Monday-Friday) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;networkdays ('2007-02-19', '2007-03-01')&lt;/SPAN&gt; returns 9 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 27 Feb 2014 18:49:55 GMT</pubDate>
    <dc:creator>santharubban</dc:creator>
    <dc:date>2014-02-27T18:49:55Z</dc:date>
    <item>
      <title>Average hours per workday</title>
      <link>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577024#M546638</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'm relatively new to QlikView and was wondering if there is a method to aggregate all workdays to an average working hours, and then show them in a Gantt-chart style.&lt;/P&gt;&lt;P&gt;I've searched the community already and couldn't find the answer, probably because I can't formulate my question adequately.&lt;/P&gt;&lt;P&gt;I already got the following: It shows all dates in day names &lt;EM&gt;date(&amp;lt;datefield goes here&amp;gt; 'WWWW')&lt;/EM&gt; over an period of some weeks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/53936_Capture.PNG.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression is a simple SUM of total work time (end-start time) with an offset on the start time.&lt;/P&gt;&lt;P&gt;But what i want is the following (I made a selection of last week data)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/53917_Capture.PNG.png" style="max-width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The data is in Dutch and represents the weekdays monday-friday.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I sure hope it's possible!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;Job van den Berg&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 07:51:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577024#M546638</guid>
      <dc:creator />
      <dc:date>2014-02-27T07:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Average hours per workday</title>
      <link>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577025#M546639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your dimension:&lt;/P&gt;&lt;P&gt;text(WeekDay(YourDateField))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 18:21:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577025#M546639</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-02-27T18:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: Average hours per workday</title>
      <link>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577026#M546641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;try this, &lt;SPAN class="Code"&gt;networkdays&lt;/SPAN&gt; returns the number of working days (Monday-Friday) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="Code"&gt;networkdays ('2007-02-19', '2007-03-01')&lt;/SPAN&gt; returns 9 &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 18:49:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577026#M546641</guid>
      <dc:creator>santharubban</dc:creator>
      <dc:date>2014-02-27T18:49:55Z</dc:date>
    </item>
    <item>
      <title>Re: Average hours per workday</title>
      <link>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577027#M546643</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;date(&amp;lt;datefield goes here&amp;gt; 'WWWW') &lt;/EM&gt;will only change the formatting of the date to the day name. The underlying values are still the individual dates. What you need is a weekday field as dimension. You can create that in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MapDays:&lt;/P&gt;&lt;P&gt;mapping load * inline [&lt;/P&gt;&lt;P&gt;Weekday, Name&lt;/P&gt;&lt;P&gt;0, Maandag&lt;/P&gt;&lt;P&gt;1, Dinsdag&lt;/P&gt;&lt;P&gt;2, Woensdag&lt;/P&gt;&lt;P&gt;3, Donderdag&lt;/P&gt;&lt;P&gt;4, Vrijdag&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WorkDays:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; , StartTime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; , EndTime&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; , interval(EndTime-StartTime,'hh:mm') as WorkHours&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; , &lt;EM&gt;applymap('MapDays',weekday(Date)) as Weekday&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;from &lt;EM&gt;...mysource...&lt;/EM&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 19:10:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577027#M546643</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2014-02-27T19:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Average hours per workday</title>
      <link>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577028#M546645</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe an aggregation like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AVG(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; AGGR(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SUM(time),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; yourdimension&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 20:05:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577028#M546645</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2014-02-27T20:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Average hours per workday</title>
      <link>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577029#M546647</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem is that date() function changes the text format of dual data type (date is dual, both text and numeric). The&amp;nbsp; numerical date remains unchanged. So you see separate dimension value for each maandag (QV distinguishes the values by numeric part).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To solve the problem you should have the numeric values of each maandag to be equal. The functions like Month, WeekDay etc. do that. Then you can use Date() function to set the format you like:&lt;/P&gt;&lt;P&gt;=Date(WeekDay(Date), 'WWWW')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Feb 2014 20:51:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-hours-per-workday/m-p/577029#M546647</guid>
      <dc:creator>whiteline</dc:creator>
      <dc:date>2014-02-27T20:51:09Z</dc:date>
    </item>
  </channel>
</rss>

