<?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 Calculating time as a percentage per dimension in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculating-time-as-a-percentage-per-dimension/m-p/1825411#M67834</link>
    <description>&lt;P&gt;Hi, I've spent a couple of days on this problem now, and can't find a solution.&lt;/P&gt;&lt;P&gt;So I have two tables.&lt;/P&gt;&lt;P&gt;My &lt;STRONG&gt;parent order table&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnnyjohn_2-1627546985655.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59361i90FD221100EC775D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="johnnyjohn_2-1627546985655.png" alt="johnnyjohn_2-1627546985655.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and my &lt;STRONG&gt;child order table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnnyjohn_3-1627546995933.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59362i39B59E4D06541696/image-size/medium?v=v2&amp;amp;px=400" role="button" title="johnnyjohn_3-1627546995933.png" alt="johnnyjohn_3-1627546995933.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Basically, what I am trying to do here is calculate the child time as a percent, aggregated by Parent ID. To do this, I calculate the &lt;STRONG&gt;lifetime of the order&lt;/STRONG&gt; in seconds (Max ChildTime - Min ChildTime) for each Parent ID, then calculate the time into the &lt;STRONG&gt;life of the order of the child&lt;/STRONG&gt; in seconds (ChildTime - MinTime) for each Parent ID, then divide the time of the child by the life time of the order, that gives me the figure I want (mathematically at least).&lt;/P&gt;&lt;P&gt;In QlikSense I have the below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnnyjohn_1-1627551956418.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59370i68D9DFF2B40E469C/image-size/large?v=v2&amp;amp;px=999" role="button" title="johnnyjohn_1-1627551956418.png" alt="johnnyjohn_1-1627551956418.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Child Time in Second = Num(ChildTime) *24*60*60&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;First Fill in Second = Num(Aggr(Min(ChildTime),[Ord ID])) *24*60*60&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Last Fill in Second = Num(Aggr(Max(ChildTime),[Ord ID])) *24*60*60&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But for SOME REASON, when&amp;nbsp; I try to find my Child Time - First Fill&amp;nbsp; with this, only a single value shows for the dimension, as shown on the table above&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=(Num(ChildTime) *24*60*60) - (Num(Aggr(Min(ChildTime),[Ord ID])) *24*60*60)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any idea why this is happening? Or how I can achieve what I described.&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
    <pubDate>Thu, 29 Jul 2021 09:51:29 GMT</pubDate>
    <dc:creator>johnnyjohn</dc:creator>
    <dc:date>2021-07-29T09:51:29Z</dc:date>
    <item>
      <title>Calculating time as a percentage per dimension</title>
      <link>https://community.qlik.com/t5/App-Development/Calculating-time-as-a-percentage-per-dimension/m-p/1825411#M67834</link>
      <description>&lt;P&gt;Hi, I've spent a couple of days on this problem now, and can't find a solution.&lt;/P&gt;&lt;P&gt;So I have two tables.&lt;/P&gt;&lt;P&gt;My &lt;STRONG&gt;parent order table&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnnyjohn_2-1627546985655.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59361i90FD221100EC775D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="johnnyjohn_2-1627546985655.png" alt="johnnyjohn_2-1627546985655.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;and my &lt;STRONG&gt;child order table&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnnyjohn_3-1627546995933.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59362i39B59E4D06541696/image-size/medium?v=v2&amp;amp;px=400" role="button" title="johnnyjohn_3-1627546995933.png" alt="johnnyjohn_3-1627546995933.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Basically, what I am trying to do here is calculate the child time as a percent, aggregated by Parent ID. To do this, I calculate the &lt;STRONG&gt;lifetime of the order&lt;/STRONG&gt; in seconds (Max ChildTime - Min ChildTime) for each Parent ID, then calculate the time into the &lt;STRONG&gt;life of the order of the child&lt;/STRONG&gt; in seconds (ChildTime - MinTime) for each Parent ID, then divide the time of the child by the life time of the order, that gives me the figure I want (mathematically at least).&lt;/P&gt;&lt;P&gt;In QlikSense I have the below:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="johnnyjohn_1-1627551956418.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59370i68D9DFF2B40E469C/image-size/large?v=v2&amp;amp;px=999" role="button" title="johnnyjohn_1-1627551956418.png" alt="johnnyjohn_1-1627551956418.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Child Time in Second = Num(ChildTime) *24*60*60&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;First Fill in Second = Num(Aggr(Min(ChildTime),[Ord ID])) *24*60*60&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Last Fill in Second = Num(Aggr(Max(ChildTime),[Ord ID])) *24*60*60&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But for SOME REASON, when&amp;nbsp; I try to find my Child Time - First Fill&amp;nbsp; with this, only a single value shows for the dimension, as shown on the table above&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;=(Num(ChildTime) *24*60*60) - (Num(Aggr(Min(ChildTime),[Ord ID])) *24*60*60)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any idea why this is happening? Or how I can achieve what I described.&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Jul 2021 09:51:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculating-time-as-a-percentage-per-dimension/m-p/1825411#M67834</guid>
      <dc:creator>johnnyjohn</dc:creator>
      <dc:date>2021-07-29T09:51:29Z</dc:date>
    </item>
  </channel>
</rss>

