<?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 Calculate the duration between two stages on a bar chart in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculate-the-duration-between-two-stages-on-a-bar-chart/m-p/1853774#M70485</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I got a requirement to calculate the duration taken place between two stages data is as below:&lt;/P&gt;
&lt;P&gt;Load * inline[&lt;/P&gt;
&lt;P&gt;Job id,emp name, state,time&lt;/P&gt;
&lt;P&gt;1,A,Start,1/1/2018&lt;/P&gt;
&lt;P&gt;1,A,Process ,2/1/2018&lt;/P&gt;
&lt;P&gt;1,A, End,3/1/2018&lt;/P&gt;
&lt;P&gt;2,C,Process 23/02/2019&lt;/P&gt;
&lt;P&gt;2,C,Start 26/02/2019]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Country:&lt;/P&gt;
&lt;P&gt;Load * inline[&lt;/P&gt;
&lt;P&gt;Job id, Country&lt;/P&gt;
&lt;P&gt;1,US&lt;/P&gt;
&lt;P&gt;2,UK&lt;/P&gt;
&lt;P&gt;3,UAE]&lt;/P&gt;
&lt;P&gt;I have to tables and need to calcualate the duration between stages (process -end)against a emp name in a table and show the avg time taken to complete between process - end stage by country&lt;/P&gt;
&lt;P&gt;Thanks in advance!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;]&lt;/P&gt;</description>
    <pubDate>Fri, 29 Oct 2021 17:07:26 GMT</pubDate>
    <dc:creator>kvr9</dc:creator>
    <dc:date>2021-10-29T17:07:26Z</dc:date>
    <item>
      <title>Calculate the duration between two stages on a bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-the-duration-between-two-stages-on-a-bar-chart/m-p/1853774#M70485</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I got a requirement to calculate the duration taken place between two stages data is as below:&lt;/P&gt;
&lt;P&gt;Load * inline[&lt;/P&gt;
&lt;P&gt;Job id,emp name, state,time&lt;/P&gt;
&lt;P&gt;1,A,Start,1/1/2018&lt;/P&gt;
&lt;P&gt;1,A,Process ,2/1/2018&lt;/P&gt;
&lt;P&gt;1,A, End,3/1/2018&lt;/P&gt;
&lt;P&gt;2,C,Process 23/02/2019&lt;/P&gt;
&lt;P&gt;2,C,Start 26/02/2019]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Country:&lt;/P&gt;
&lt;P&gt;Load * inline[&lt;/P&gt;
&lt;P&gt;Job id, Country&lt;/P&gt;
&lt;P&gt;1,US&lt;/P&gt;
&lt;P&gt;2,UK&lt;/P&gt;
&lt;P&gt;3,UAE]&lt;/P&gt;
&lt;P&gt;I have to tables and need to calcualate the duration between stages (process -end)against a emp name in a table and show the avg time taken to complete between process - end stage by country&lt;/P&gt;
&lt;P&gt;Thanks in advance!!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;]&lt;/P&gt;</description>
      <pubDate>Fri, 29 Oct 2021 17:07:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-the-duration-between-two-stages-on-a-bar-chart/m-p/1853774#M70485</guid>
      <dc:creator>kvr9</dc:creator>
      <dc:date>2021-10-29T17:07:26Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the duration between two stages on a bar chart</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-the-duration-between-two-stages-on-a-bar-chart/m-p/1853869#M70494</link>
      <description>&lt;P&gt;Try this,&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;SET DateFormat='D/M/YYYY';

Transaction:
Load * inline[
Job id, emp name, state, time
1, A, Start, 1/1/2018
1, A, Process, 2/1/2018
1, A, End, 3/1/2018
2, C, Process, 23/02/2019
2, C, Start, 26/02/2019
];

Country:
Load * inline[
Job id, Country
1, US
2, UK
3, UAE
];

Left Join(Transaction)
LOAD [Job id],[emp name], time As Dt_Process
Resident Transaction
Where state='Process';

Left Join(Transaction)
LOAD [Job id],[emp name], (time - Dt_Process) As Duration
Resident Transaction
Where state='End';&lt;/LI-CODE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="commQV20.PNG" style="width: 471px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/65641i43833151444C47A9/image-size/large?v=v2&amp;amp;px=999" role="button" title="commQV20.PNG" alt="commQV20.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Dimension:&lt;/P&gt;
&lt;P&gt;Country&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Expression:&lt;/P&gt;
&lt;P&gt;Sum(Aggr(Duration,[Job id],Country))/Count(DISTINCT [Job id])&lt;/P&gt;</description>
      <pubDate>Sat, 30 Oct 2021 15:06:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-the-duration-between-two-stages-on-a-bar-chart/m-p/1853869#M70494</guid>
      <dc:creator>Saravanan_Desingh</dc:creator>
      <dc:date>2021-10-30T15:06:25Z</dc:date>
    </item>
  </channel>
</rss>

