<?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: Qlik Sense - Creating Master Time Calendar with 15 minute intervals in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Creating-Master-Time-Calendar-with-15-minute/m-p/786613#M10967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I commented out my entire Master Calendar and added the MasterTime table as suggested.&amp;nbsp; I kept the DateBridge so I can connect my in and out dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Gysbert, it seems to work now!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Mar 2015 23:19:05 GMT</pubDate>
    <dc:creator>tcybucki</dc:creator>
    <dc:date>2015-03-13T23:19:05Z</dc:date>
    <item>
      <title>Qlik Sense - Creating Master Time Calendar with 15 minute intervals</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Creating-Master-Time-Calendar-with-15-minute/m-p/786611#M10965</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to Qliksense and have been checking the community a lot for help on creating some useful visualizations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My datasource outputs a lot of data, but I am specifically having some trouble with time stamps. I am tracking in and out times for staff.&amp;nbsp; I have columns called InPunch and Outpunch which have values in the format "m/d/yyyy hh:mm:ss TT." It was easy enough to split them up by doing:&lt;/P&gt;&lt;P&gt;Year(InPunch) AS InYear,&lt;/P&gt;&lt;P&gt;Month(InPunch) AS InMonth,&lt;/P&gt;&lt;P&gt;...and so on&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently graph a line in excel that shows how many people I have in the building at all 96 15 minute intervals in a day (ie. 0:00 - 0:15 or 18:30 to 18:45).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I first created a DateBridge to combine my in and out times; applied a CanonicalDate; and Master Calendar found in the community, and it all seems to work when the granularity is 1 day:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EmployeeNumber2InPunch:&lt;/P&gt;&lt;P&gt;MAPPING LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; InPunch&lt;/P&gt;&lt;P&gt;RESIDENT MYTABLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EmployeeNumber2OutPunch:&lt;/P&gt;&lt;P&gt;MAPPING LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Outpunch&lt;/P&gt;&lt;P&gt;RESIDENT MYTABLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//&amp;nbsp; **** CREATE A DATEBRIDGE ****&lt;/P&gt;&lt;P&gt;DateBridge:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPLYMAP('EmployeeNumber2InPunch',EmployeeNumber,Null()) AS CanonicalDate, 'InPunch' AS DateType&lt;/P&gt;&lt;P&gt;RESIDENT MYTABLE;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeeNumber,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; APPLYMAP('EmployeeNumber2OutPunch',EmployeeNumber,Null()) AS CanonicalDate, 'OutPunch' AS DateType&lt;/P&gt;&lt;P&gt;RESIDENT MYTABLE;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// **** MASTER CALENDAR ****&lt;/P&gt;&lt;P&gt;Temp:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;&amp;nbsp; min(RangeMin(InPunch,Outpunch)) AS minDate,&lt;/P&gt;&lt;P&gt;&amp;nbsp; max(RangeMin(InPunch,Outpunch)) AS maxDate&lt;/P&gt;&lt;P&gt;Resident MYTABLE; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let varMinDate = Num(Peek('minDate', 0, 'Temp')); &lt;/P&gt;&lt;P&gt;Let varMaxDate = Num(Peek('maxDate', 0, 'Temp')); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP Table Temp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TempCalendar: &lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;$(varMinDate) + Iterno()-1 As Num, &lt;/P&gt;&lt;P&gt;Date($(varMinDate) + IterNo() - 1) as TempDate &lt;/P&gt;&lt;P&gt;AutoGenerate 1 While $(varMinDate) + IterNo() -1 &amp;lt;= $(varMaxDate); &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//&amp;nbsp; **** MASTER CALENDAR ****&lt;/P&gt;&lt;P&gt;CanonicalCalendar: &lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TempDate AS CanonicalDate, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(TempDate) As CanonicalWeek, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year(TempDate) As CanonicalYear, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month(TempDate) As CanonicalMonth, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Day(TempDate) As CanonicalDay, &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Timestamp(TempDate,'hh:mm') AS CanonicalTime,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YeartoDate(TempDate)*-1 as CurYTDFlag, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; YeartoDate(TempDate,-1)*-1 as LastYTDFlag, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inyear(TempDate, Monthstart($(varMaxDate)),-1) as RC12, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Floor(date(monthstart(TempDate), 'MMM-YYYY')) as CanonicalMonthYear, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ApplyMap('QuartersMap', month(TempDate), Null()) as CanonicalQuarter, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Week(weekstart(TempDate)) &amp;amp; '-' &amp;amp; WeekYear(TempDate) as CanonicalWeekYear, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WeekDay(TempDate) as CanonicalWeekDay &lt;/P&gt;&lt;P&gt;Resident TempCalendar &lt;/P&gt;&lt;P&gt;Order By TempDate ASC; &lt;/P&gt;&lt;P&gt;Drop Table TempCalendar;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I highlighted the Timestamp line in red just because I added that in, but it does not output correctly when I try to filter times. I only see 00:00. That could be because I used the FLOOR function when I loaded my InPunch and Outpunch data though.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I adapt this to get the data to snap to a 15 minute interval, and bridge my in and out times for employees?&amp;nbsp; As I mentioned above, I want to be able to graph a line eventually showing an employee headcount by 15 minute interval, so it needs to take into consideration employees who come and go at all times of the day. Any help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Mar 2015 22:03:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Creating-Master-Time-Calendar-with-15-minute/m-p/786611#M10965</guid>
      <dc:creator>tcybucki</dc:creator>
      <dc:date>2015-03-11T22:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Creating Master Time Calendar with 15 minute intervals</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Creating-Master-Time-Calendar-with-15-minute/m-p/786612#M10966</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't create the quarters in the master calendar table. I think it's better to create a Master Time table. See this blog post for the reasons: &lt;A _jive_internal="true" class="font-color-normal" href="https://community.qlik.com/blogs/qlikviewdesignblog/2013/07/23/the-master-time-table" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3d3d3d;"&gt;The Master Time Table&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MasterTime:&lt;/P&gt;&lt;P&gt;LOAD time(recno()/96,'hh:mm') as Time&lt;/P&gt;&lt;P&gt;autogenerate(96);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Mar 2015 17:44:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Creating-Master-Time-Calendar-with-15-minute/m-p/786612#M10966</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-03-12T17:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Creating Master Time Calendar with 15 minute intervals</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Creating-Master-Time-Calendar-with-15-minute/m-p/786613#M10967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I commented out my entire Master Calendar and added the MasterTime table as suggested.&amp;nbsp; I kept the DateBridge so I can connect my in and out dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you Gysbert, it seems to work now!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Mar 2015 23:19:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Creating-Master-Time-Calendar-with-15-minute/m-p/786613#M10967</guid>
      <dc:creator>tcybucki</dc:creator>
      <dc:date>2015-03-13T23:19:05Z</dc:date>
    </item>
  </channel>
</rss>

