<?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: Split en sum duration in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114412#M753086</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A pivot table splits the data in order of dimensions. So you'd be able to collapse the floor and building dimensions in this table to show total duration per card number, but not per building or floor. To accomplish that you could either build multiple tables or, probably better yet, use a Cyclic group to be able to swap between table layouts easily without having to rebuild the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still want to be able to split the data on every level just in a customisable order, but in 1 table, you could do like I did in the attached file and create 3 cyclic groups, and add all 3 dimensions to each (settings &amp;gt; document properties &amp;gt; groups), then use all 3 as dimensions in the pivot table. You can then swap every dimension as you wish using the circular arrows in the dimension columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Oct 2018 06:15:23 GMT</pubDate>
    <dc:creator>jensmunnichs</dc:creator>
    <dc:date>2018-10-19T06:15:23Z</dc:date>
    <item>
      <title>Split en sum duration</title>
      <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114405#M753079</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 have a text file that as follows: cardnumber, building/floor, time in, time out, duration.&lt;/P&gt;&lt;P&gt;example: c001, Crown/firstfloor, 31/07/18 11:59:58 PM, 01/08/18 12:01:57 AM, 00:01:59&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Qlik is new for me so I hope somebody can give me a step in the right direction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I split building/floor and sum duration (duration cardnumber...floor)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anyone help on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Gert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114405#M753079</guid>
      <dc:creator>masterg_nl</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Split en sum duration</title>
      <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114406#M753080</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you can share image of data file and expected result?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 03:36:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114406#M753080</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2018-10-18T03:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Split en sum duration</title>
      <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114407#M753081</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Some background information, A customer can use a room and have to pay the total time he makes use of the room. The customer makes use of a smartcard to get in and out the room.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to know how much time the customer spend in the building and in a room. O&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN&gt;ccupancy rate per room&lt;SPAN class="short_text" lang="en"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt; etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'va added an image of the datafile.&lt;IMG alt="Screen Shot 2018-10-18 at 08.42.32.png" class="jive-image image-1" src="/legacyfs/online/216220_Screen Shot 2018-10-18 at 08.42.32.png" style="height: 75px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 11:25:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114407#M753081</guid>
      <dc:creator>masterg_nl</dc:creator>
      <dc:date>2018-10-18T11:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Split en sum duration</title>
      <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114408#M753082</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To split building/floor, you can use the SubField function in script. See the script in the attached file. You cannot do this in the original load, as you cannot perform calculations on fields that haven't been loaded in yet. That's why you have to load in your data first, name that table, then perform a resident load that includes your calculations, and then drop the original table as you no longer need it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To sum duration and group it by cardnumber/floor/building/anything (I think this is what you mean) you have 2 options. You can either calculate and group the duration in script and create a separate table in the data model (dropping the original ungrouped data afterwards if possible), or you can do it in front end, probably in a straight table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I only used the second option in the attached file as it's a lot simpler and leaves your data ungrouped for further analysis. Simply add a chart, select Straight table in chart type, add cardnumber/building/floor as dimension (depending on how you want the data to be grouped), then add Sum(duration) as the expression. Keep pressing next until you get to number format, and switch the number format for the expression to Time. Click finish and you should have what you want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps, if not let me know &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 12:36:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114408#M753082</guid>
      <dc:creator>jensmunnichs</dc:creator>
      <dc:date>2018-10-18T12:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Split en sum duration</title>
      <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114409#M753083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at the attached file. Splitting of Building/floor is done in the code, whereas the calculation of duration is done in the chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output as below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Sum Duration.PNG" class="jive-image image-1" src="/legacyfs/online/216241_Sum Duration.PNG" style="height: 204px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 14:37:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114409#M753083</guid>
      <dc:creator>anders_thorngaa</dc:creator>
      <dc:date>2018-10-18T14:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Split en sum duration</title>
      <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114410#M753084</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anders,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, this is what I try to accomplish. With this is it also possible to filter total duration for example on 'first floor' ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 14:54:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114410#M753084</guid>
      <dc:creator>masterg_nl</dc:creator>
      <dc:date>2018-10-18T14:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Split en sum duration</title>
      <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114411#M753085</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As Jens mentioned you can do subfield() to split building/floor as &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tab1:&lt;/P&gt;&lt;P&gt;LOAD Keyfield,&lt;/P&gt;&lt;P&gt;Subfield([Building/floor], '/',1) AS Building&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Subfield([Building/floor], '/',2) AS Floor&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Interval(duration, 'ss') as Seconds&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;From tablename;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LEFT JOIN(Tab1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;LOAD Keyfield&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Seconds) as Sum_Duration&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Resident Tab1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Group By Keyfield;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;--&amp;gt; To convert the Sum_Duration to actual time duration you can try like &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Interval(Sum_Duration/(24*60*60), 'hh:mm:ss') as TimeDuration&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Oct 2018 16:30:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114411#M753085</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2018-10-18T16:30:31Z</dc:date>
    </item>
    <item>
      <title>Re: Split en sum duration</title>
      <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114412#M753086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A pivot table splits the data in order of dimensions. So you'd be able to collapse the floor and building dimensions in this table to show total duration per card number, but not per building or floor. To accomplish that you could either build multiple tables or, probably better yet, use a Cyclic group to be able to swap between table layouts easily without having to rebuild the table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you still want to be able to split the data on every level just in a customisable order, but in 1 table, you could do like I did in the attached file and create 3 cyclic groups, and add all 3 dimensions to each (settings &amp;gt; document properties &amp;gt; groups), then use all 3 as dimensions in the pivot table. You can then swap every dimension as you wish using the circular arrows in the dimension columns.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Oct 2018 06:15:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114412#M753086</guid>
      <dc:creator>jensmunnichs</dc:creator>
      <dc:date>2018-10-19T06:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: Split en sum duration</title>
      <link>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114413#M753087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depending on how you want to present the data you could also change the order of dimensions and/or add list boxes as I have done below. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Filter sum duration.PNG" class="jive-image image-1" src="/legacyfs/online/216446_Filter sum duration.PNG" style="height: 143px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 11:37:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Split-en-sum-duration/m-p/114413#M753087</guid>
      <dc:creator>anders_thorngaa</dc:creator>
      <dc:date>2018-10-22T11:37:33Z</dc:date>
    </item>
  </channel>
</rss>

