<?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 No of days with multiple reopen dates in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/No-of-days-with-multiple-reopen-dates/m-p/2001646#M82971</link>
    <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;I need to create a age bucket basis the no of days elapsed in treating the ticket, the concern here is a ticket can be reopened multiple times so basis the status i will need to calculate no of days involved on the ticket.&lt;/P&gt;
&lt;P&gt;For Eg:&lt;/P&gt;
&lt;P&gt;1. Ticket opened and closed once in its entire journey then open date- close date&lt;/P&gt;
&lt;P&gt;2. Ticket opened on Jan 1st , closed on 15th, reopened on Feb 5th closed on 10th and reopened on Oct 1 and closed on Oct 20 then no of days would be 15+5+20=40 days&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;Ticket opened on Jan 1st , closed on 15th, reopened on Feb 5th closed on 10th and reopened on Oct 1 and is still in progress&amp;nbsp; &amp;nbsp;then no of days would be 15+5+38(Oct 1 to Nov 8th)=58 days&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know how this can achieved with less impact on performance considering there are millions of tickets, attaching a sample data for reference&lt;/P&gt;</description>
    <pubDate>Tue, 08 Nov 2022 10:46:04 GMT</pubDate>
    <dc:creator>anushree1</dc:creator>
    <dc:date>2022-11-08T10:46:04Z</dc:date>
    <item>
      <title>No of days with multiple reopen dates</title>
      <link>https://community.qlik.com/t5/App-Development/No-of-days-with-multiple-reopen-dates/m-p/2001646#M82971</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;
&lt;P&gt;I need to create a age bucket basis the no of days elapsed in treating the ticket, the concern here is a ticket can be reopened multiple times so basis the status i will need to calculate no of days involved on the ticket.&lt;/P&gt;
&lt;P&gt;For Eg:&lt;/P&gt;
&lt;P&gt;1. Ticket opened and closed once in its entire journey then open date- close date&lt;/P&gt;
&lt;P&gt;2. Ticket opened on Jan 1st , closed on 15th, reopened on Feb 5th closed on 10th and reopened on Oct 1 and closed on Oct 20 then no of days would be 15+5+20=40 days&lt;/P&gt;
&lt;P&gt;3.&amp;nbsp;Ticket opened on Jan 1st , closed on 15th, reopened on Feb 5th closed on 10th and reopened on Oct 1 and is still in progress&amp;nbsp; &amp;nbsp;then no of days would be 15+5+38(Oct 1 to Nov 8th)=58 days&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know how this can achieved with less impact on performance considering there are millions of tickets, attaching a sample data for reference&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 10:46:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/No-of-days-with-multiple-reopen-dates/m-p/2001646#M82971</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2022-11-08T10:46:04Z</dc:date>
    </item>
    <item>
      <title>Re: No of days with multiple reopen dates</title>
      <link>https://community.qlik.com/t5/App-Development/No-of-days-with-multiple-reopen-dates/m-p/2001671#M82975</link>
      <description>&lt;P&gt;Hi, with this script you can calculate how many days has been each instance of 'Open', it counts day until the next closed, or until today.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ProcessedData:
LOAD
	TicketId,
	Status,
	Date,
	If(Status='Open'
	  ,If(Peek(TicketId)=TicketId and Peek(Status)='Close'
	    ,Peek(Date)-Date
	    ,Today()-Date)
	  ,0)				as DaysOpened
Resident InitialData
Order by TicketId, Date desc;&lt;/LI-CODE&gt;
&lt;P&gt;With this you can do a group by TicketId and sum(DaysOpened) to count how many days each ticket has been in Open state.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 11:41:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/No-of-days-with-multiple-reopen-dates/m-p/2001671#M82975</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2022-11-08T11:41:22Z</dc:date>
    </item>
    <item>
      <title>Re: No of days with multiple reopen dates</title>
      <link>https://community.qlik.com/t5/App-Development/No-of-days-with-multiple-reopen-dates/m-p/2001883#M82996</link>
      <description>&lt;P&gt;Thanks it works like a charm.. I am bowled over the logic.. its very neat and well thought..&lt;/P&gt;
&lt;P&gt;Highly envious on that though!!!&lt;/P&gt;
&lt;P&gt;Thanks again&lt;/P&gt;</description>
      <pubDate>Tue, 08 Nov 2022 16:54:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/No-of-days-with-multiple-reopen-dates/m-p/2001883#M82996</guid>
      <dc:creator>anushree1</dc:creator>
      <dc:date>2022-11-08T16:54:19Z</dc:date>
    </item>
  </channel>
</rss>

