<?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 Problem displaying scheduled hours in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316221#M583293</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;I have a problem displaying scheduled hours.&lt;/P&gt;&lt;P&gt;My data looks like image below (also see attached QV file)...&lt;EM&gt;id, date_from, time_from, date_to, time_to &lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="MyQV.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/8598_MyQV.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I want to use this information and display, in a chart (and table), how people schedule their hours, hour by hour.&lt;/P&gt;&lt;P&gt;So far I have been able to show when people start/finish ( see below), hour by hour...&lt;/P&gt;&lt;P&gt;But I really want to see when people are working (not just when they start or finish), hour by hour....&lt;/P&gt;&lt;P&gt;Like, how many people are working at a specifik time, hour by hour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody that knows how I can do that?&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, see attached QV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 13 Nov 2011 11:54:18 GMT</pubDate>
    <dc:creator>qw_johan</dc:creator>
    <dc:date>2011-11-13T11:54:18Z</dc:date>
    <item>
      <title>Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316221#M583293</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;I have a problem displaying scheduled hours.&lt;/P&gt;&lt;P&gt;My data looks like image below (also see attached QV file)...&lt;EM&gt;id, date_from, time_from, date_to, time_to &lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;IMG alt="MyQV.jpg" class="jive-image-thumbnail jive-image" onclick="" src="https://community.qlik.com/legacyfs/online/8598_MyQV.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;I want to use this information and display, in a chart (and table), how people schedule their hours, hour by hour.&lt;/P&gt;&lt;P&gt;So far I have been able to show when people start/finish ( see below), hour by hour...&lt;/P&gt;&lt;P&gt;But I really want to see when people are working (not just when they start or finish), hour by hour....&lt;/P&gt;&lt;P&gt;Like, how many people are working at a specifik time, hour by hour.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anybody that knows how I can do that?&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, see attached QV.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Nov 2011 11:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316221#M583293</guid>
      <dc:creator>qw_johan</dc:creator>
      <dc:date>2011-11-13T11:54:18Z</dc:date>
    </item>
    <item>
      <title>Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316222#M583295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Johan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had a similar issue to count how many stores are open at any time &lt;/P&gt;&lt;P&gt;Look at this qhare qv.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/qlikviews/http://community.qlik.com/qlikviews/1066"&gt;http://community.qlik.com/qlikviews/1066&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it could solve your isse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Nov 2011 13:32:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316222#M583295</guid>
      <dc:creator />
      <dc:date>2011-11-13T13:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316223#M583298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi JJ!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your reply (QV) was very helpful. I successfully "copied" your approach and was able to &lt;/P&gt;&lt;P&gt;get the chart I was looking for. Thank you very much.&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="8599" alt="MyQV.jpg" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/8599_MyQV.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;****** CODE ******&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;[Scheduled time]:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;LOAD ID, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date_from, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time_from, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; date_to, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time_to,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 as number_of_records,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekDay(date#(date_from, 'YYYYMMDD')) as work_start_day,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time(MakeTime(left(time_from,2))) as KEY_HOUR_START,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; time(MakeTime(left(time_to,2))) as KEY_HOUR_END&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;FROM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;test_data.qvo(txt, codepage is 1252, embedded labels, delimiter is '\t', msq);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;TIME_RANGE: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;Load time(maketime(rowno())) as HOUR &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;Autogenerate(24) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;In chart...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;= sum (&amp;nbsp; aggr( Max( if( HOUR &amp;gt;= KEY_HOUR_START and&amp;nbsp; HOUR&amp;nbsp; &amp;lt; KEY_HOUR_END ,1 , 0) )&amp;nbsp; , ID, HOUR) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;and HOUR as dimension.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;****** CODE ******&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Just have a few more questions that maybe you can help me with.&lt;/P&gt;&lt;P&gt;Can I make this display every half-hour?&lt;/P&gt;&lt;P&gt;Why doesn't the chart start at 00:00:00 and go all the way until 23:00:00....I know I have times there....?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Nov 2011 17:09:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316223#M583298</guid>
      <dc:creator>qw_johan</dc:creator>
      <dc:date>2011-11-13T17:09:15Z</dc:date>
    </item>
    <item>
      <title>Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316224#M583300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Nice !&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To work with half-hour,&amp;nbsp; you can generate a new field in the script&amp;nbsp; with 48 values 0, 0.5,1,..., 24 :&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;rowno()/2 as HalfHour&lt;/P&gt;&lt;P&gt; Autogenerate(48) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the chart create the expression : &lt;/P&gt;&lt;P&gt;= sum (&amp;nbsp; aggr( Statut * Max( if( HalfHour/24 &amp;gt;= Open_Hour and&amp;nbsp; HalfHour/24&amp;nbsp; &amp;lt; Close_Hour-0.0001 ,1 , 0) )&amp;nbsp; , ID, HalfHour) )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For the second question, I think you must begin at 0 not at 1 the autogeneration. &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;Load time(maketime(rowno()-1)) as HOUR &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;Autogenerate(24) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 8pt;"&gt;And change the inequality &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new',courier; font-size: 8pt;"&gt; sum (&amp;nbsp; aggr( Max( if( HOUR &amp;gt;= KEY_HOUR_START and&amp;nbsp; HOUR&amp;nbsp; &amp;lt;= KEY_HOUR_END ,1 , 0) )&amp;nbsp; , ID, HOUR) )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new',courier; font-size: 8pt;"&gt;jj&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Nov 2011 17:35:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316224#M583300</guid>
      <dc:creator />
      <dc:date>2011-11-13T17:35:13Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316225#M583302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your TIME_RANGE creation using maketime with rowno() 1 to 24 (with 24 not being accepted by maketime) is why you get the limited display.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try replacing this with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIME_RANGE:&lt;/P&gt;&lt;P&gt;LOAD time((RowNo()-1)/48) as HOUR&lt;/P&gt;&lt;P&gt;Autogenerate(49);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should create a full 24h range in 30 min increments. &lt;/P&gt;&lt;P&gt;I think you don't need to change anything else since your chart count should be happy with 30 min HOUR intervals.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But since your scheduled time is available in shorter than hour intervals (15 min?), you could also use &lt;/P&gt;&lt;P&gt;Try replacing this with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TIME_RANGE:&lt;/P&gt;&lt;P&gt;LOAD time((RowNo()-1)/96) as HOUR&lt;/P&gt;&lt;P&gt;Autogenerate(97);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;time(time#(time_from,'hhmm')) as KEY_HOUR_START,&lt;/P&gt;&lt;P&gt;time(time#(time_to,'hhmm')) as KEY_HOUR_END,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for 15 min HOUR intervals and full KEY_HOUR resolution up to the minutes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: just noticed Jean-Jacques answer after posting, mine is almost identical (but please note the autogenerate(49) which will create a full 24 hour period from 0:00 to 24:00, or 0 to 1 in numerical representation).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Nov 2011 17:42:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316225#M583302</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-13T17:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316226#M583303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to you both JJ and Stefan. Your answers were VERY helpful.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 13 Nov 2011 19:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316226#M583303</guid>
      <dc:creator>qw_johan</dc:creator>
      <dc:date>2011-11-13T19:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316227#M583304</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;Sorry, but I have one more question and I hope you can explain it to me.&lt;/P&gt;&lt;P&gt;My test database holds about 150.000 records (with IDs, dates and times), but only &lt;/P&gt;&lt;P&gt;about 20.000 of them are displayed ?!?...if I load my data with the expression in a table &lt;/P&gt;&lt;P&gt;instead of a chart I can se the total # of records at a specific time. Why is it such&lt;/P&gt;&lt;P&gt;a big difference?...I would think I would see a total of 150.000 records in my table too.&lt;/P&gt;&lt;P&gt;Did I do something wrong...does Qlikview do something I don't understand (like consolidating records etc)?&lt;/P&gt;&lt;P&gt;Any ideas to why? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Included QV for reference.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="8620" alt="my_image.jpg" class="jive-image-thumbnail jive-image" src="https://community.qlik.com/legacyfs/online/8620_my_image.jpg" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 21:21:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316227#M583304</guid>
      <dc:creator>qw_johan</dc:creator>
      <dc:date>2011-11-14T21:21:39Z</dc:date>
    </item>
    <item>
      <title>Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316228#M583305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just select a single ID, e.g. 0012.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will get 115 records, but your chart will show only max number 1 at any time ID 0012 has worked at any day.&lt;/P&gt;&lt;P&gt;(That's because your chart is using dimension ID in aggr() function).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you look at any specific time of the day, a number of people working at a specific time does not necessarily mean they work at the same day at that specific time, just that they ever worked at that time some point in time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this ok for you?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 21:42:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316228#M583305</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-14T21:42:13Z</dc:date>
    </item>
    <item>
      <title>Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316229#M583306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just noticed, that e.g. ID&amp;nbsp; 4018 shows overlapping time periods for the same day. Is this reasonably?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Nov 2011 21:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316229#M583306</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-14T21:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316230#M583307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh ok, thanks for explaining this.&lt;/P&gt;&lt;P&gt;Yes, it is ok for me at this time. I am very happy with the result so far. Also, I can always select a date to see how the chart looks for a particular day. &lt;/P&gt;&lt;P&gt;But, if I later would like to change my application so that for ID 0012 it would show all the 115 records in the chart...would that be possible? How would I do that? &lt;/P&gt;&lt;P&gt;In my application so far I have used aggr() function...is there a better way or a different way to get the same result?&lt;/P&gt;&lt;P&gt;How does the aggr() function perform if I have more data...lets say a couple of million rows? Should my approach be different? (performance, memory usage etc..)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, overlapping time periods would not be ok in real life...this is just test data and overlapping time periods might exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help,&lt;/P&gt;&lt;P&gt;Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 16:13:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316230#M583307</guid>
      <dc:creator>qw_johan</dc:creator>
      <dc:date>2011-11-15T16:13:32Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316231#M583308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if you need the aggr(). Probably not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You may want to play around with &lt;/P&gt;&lt;P&gt;=count(DISTINCT if( HALFHOURS &amp;gt;= my_time_from and&amp;nbsp; HALFHOURS&amp;nbsp; &amp;lt; my_time_to ,ID ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you should get the same result as with your aggr() function. count(distinct ..) is not very good performing, but there are some methods to overcome this.&lt;/P&gt;&lt;P&gt;For example, you could create a separate table with only unique IDs and a second field IDCounter with constant value 1. Then use a sum on this counter instead the count distinct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;=sum( if( HALFHOURS &amp;gt;= my_time_from and&amp;nbsp; HALFHOURS&amp;nbsp; &amp;lt; my_time_to ,1,0 ))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This should aggregate over all records, so if you select only one ID, you'll see the time of day where this ID worked frequently or only randomly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please see attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 16:51:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316231#M583308</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-15T16:51:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316232#M583309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks. It was very interesting to see the difference between the expressions.&lt;/P&gt;&lt;P&gt;And thanks for explaining them.&lt;/P&gt;&lt;P&gt;The &lt;SPAN style="font-family: 'courier new', courier;"&gt;count(DISTINCT .....&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; does seem to give the same result as aggr().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was especially surprised when I saw what this expression did:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;=sum( if( HALFHOURS &amp;gt;= my_time_from and&amp;nbsp; HALFHOURS&amp;nbsp; &amp;lt; my_time_to ,1,0 ))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;This is probably an even better way of doing what I want...looks like the result is "better".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//Johan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Nov 2011 20:27:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316232#M583309</guid>
      <dc:creator>qw_johan</dc:creator>
      <dc:date>2011-11-15T20:27:30Z</dc:date>
    </item>
    <item>
      <title>Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316233#M583310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi qv_johan&lt;/P&gt;&lt;P&gt;I´ve started an similar discussion of how many people were in a building at a specific time and it looks like your problem here is somewhat the same.&lt;/P&gt;&lt;P&gt;I got one question for you - what happens if there is a time that crosses a date ex. &lt;/P&gt;&lt;P&gt;mydatestart&amp;nbsp; mytimestart&amp;nbsp;&amp;nbsp; mydateend&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mytimeend&lt;/P&gt;&lt;P&gt;2011-11-11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 23:00&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2011-11-12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 02:00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;could you please attach your final qvw file&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 07:33:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316233#M583310</guid>
      <dc:creator />
      <dc:date>2011-11-23T07:33:37Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316234#M583311</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 final qvw file is the one that &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/swuehl" id="jive-1582310509721169769342" style="background-color: #f9f9f9; font-size: 12px; color: #007fc0; font-weight: bold; font-family: Arial; text-align: center;"&gt;swuehl&lt;/A&gt; posted here. I add it to this reply too.&lt;/P&gt;&lt;P&gt;Sorry...but time that crosses a date haven't been a problem to me so I haven't thought about that.&lt;/P&gt;&lt;P&gt;But my guess is that it would just stop at midnight...not cross over and continue next date.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 19:53:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316234#M583311</guid>
      <dc:creator>qw_johan</dc:creator>
      <dc:date>2011-11-23T19:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316235#M583312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, I think that these records will not be taken correctly into account.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you look at the condition&lt;/P&gt;&lt;P&gt;if( HALFHOURS &amp;gt;= my_time_from and&amp;nbsp; HALFHOURS&amp;nbsp; &amp;lt; my_time_to ,1,0 )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and if you replace my_time_from and my_time_to with actual hours, in most records that will cross a date, my_time_to will be smaller than my_time_from, so above AND condition could not be fulfilled.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You could certainly work around this using additional check for a date crossing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Nov 2011 23:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316235#M583312</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-11-23T23:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316236#M583313</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;swuehl - &lt;/P&gt;&lt;P&gt;I posted a discussion some days ago and one several weeks ago but nobody seems to have a clue to solve my problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the post is : How many people were/are in the building.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Somewhat the same as this displaying scheduled hours.&lt;BR /&gt;For me I just want to calculate how many people is in the building a a specific time - using a login and logout data - which can spread over several days&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Nov 2011 07:28:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316236#M583313</guid>
      <dc:creator />
      <dc:date>2011-11-24T07:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316237#M583314</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;I am very happy with my application so far. But now i am trying to figure out how to check &lt;/P&gt;&lt;P&gt;for date crossing. Would I check for that inside this expression with another if condition?&lt;/P&gt;&lt;P&gt;if( HALFHOURS &amp;gt;= my_time_from and&amp;nbsp; HALFHOURS&amp;nbsp; &amp;lt; my_time_to ,1, &lt;STRONG&gt;NEW IF CONDITION HERE&lt;/STRONG&gt; 0 )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 08:19:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316237#M583314</guid>
      <dc:creator>qw_johan</dc:creator>
      <dc:date>2011-12-11T08:19:14Z</dc:date>
    </item>
    <item>
      <title>Problem displaying scheduled hours</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316238#M583315</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;both John Witherspoon and me created different working solutions for polschou's similar request, so you just want to have a look into that:&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/thread/38841"&gt;http://community.qlik.com/thread/38841&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 11 Dec 2011 12:40:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-displaying-scheduled-hours/m-p/316238#M583315</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-12-11T12:40:50Z</dc:date>
    </item>
  </channel>
</rss>

