<?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: Avg Days in Que in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544020#M481775</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help.&amp;nbsp; I have a disconnect table but I'm not real familiar with Set Analysis.&amp;nbsp; I will look it up and see what I can come up with.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Sep 2013 18:23:43 GMT</pubDate>
    <dc:creator>kstroupe</dc:creator>
    <dc:date>2013-09-25T18:23:43Z</dc:date>
    <item>
      <title>Avg Days in Que</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544016#M481771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hello,&lt;/P&gt;&lt;P&gt;I am very new to QlikView but I hoping someone has figured this out already.&amp;nbsp; I need to count the number of defects for a week. Get the Sum of the days the defect was open and then take the count of the ttl defects for the week / sum of the days the defect was open.&amp;nbsp; Put this on a graph by week and figure out the Avg Days the defects were open. Any idea how to get this started?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is an example of the data.&amp;nbsp; I have two ways to possibly do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;defect 1 was created 1/2/13 and closed on 2/16/13 therefore it must be counted every week from 1/2 until it closes.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Sep 2013 03:27:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544016#M481771</guid>
      <dc:creator>kstroupe</dc:creator>
      <dc:date>2013-09-20T03:27:44Z</dc:date>
    </item>
    <item>
      <title>Re: Avg Days in Que</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544017#M481772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kim,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your explanation, it's not too clear what is the required formula: "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;count of the ttl defects for the week / sum of the days the defect was open" is not the same as "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;the Avg Days the defects were open&lt;/SPAN&gt;".&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;The solution could be different depending on how do you want to count defects vs. weeks. For example, if the defect was open on 1/2/13 and it was open for 6 weeks - would you like to count a single defect in the week it was open and the duration of 6 weeks, or would you like to count the event in each week while it was open (6 times in this example), with the duration of 6 weeks? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be much simpler if you associated the defect with the week it was either open or closed. If you had to count it in every week while it's open, the solutions are quite complex, unless your dataset is very small and you can afford using IF statements...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd be happy to help you if you'd like to clarify your requirement a little bit...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.naturalsynergies.com/"&gt;www.naturalsynergies.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Sep 2013 23:21:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544017#M481772</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2013-09-23T23:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: Avg Days in Que</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544018#M481773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oleg,&lt;/P&gt;&lt;P&gt;Thank you for your response.&amp;nbsp; The answer is the later of your example.&amp;nbsp; Cound the defect for each week which would be open 6 times.&amp;nbsp; I think I'm going to just write the SQL and bring it into QlikView rather then trying to have QlikView App&amp;nbsp; bucket it.&amp;nbsp; My SQL will then give me the following&lt;/P&gt;&lt;P&gt;week_beg_dt&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; week_end_dt&amp;nbsp; qty&lt;/P&gt;&lt;P&gt;1/6/2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/12/2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;1/13/2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1/19/2013&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;and so on until the week it's closed.&amp;nbsp; then I will just use Week_begin_dt in my graph.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unless you know of a way that QlikView can do this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Kim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 18:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544018#M481773</guid>
      <dc:creator>kstroupe</dc:creator>
      <dc:date>2013-09-25T18:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: Avg Days in Que</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544019#M481774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you can do&lt;/P&gt;&lt;P&gt;1) Create a disconnect table for each week and uses it as dimension&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp; date(WeekStart(Today() - RecNo())) as Week&lt;/P&gt;&lt;P&gt;autogenerate 50; // 50 weeks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) use Set Analysis to count defects&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 18:17:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544019#M481774</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-09-25T18:17:15Z</dc:date>
    </item>
    <item>
      <title>Re: Avg Days in Que</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544020#M481775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your help.&amp;nbsp; I have a disconnect table but I'm not real familiar with Set Analysis.&amp;nbsp; I will look it up and see what I can come up with.&amp;nbsp; Thanks&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 18:23:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544020#M481775</guid>
      <dc:creator>kstroupe</dc:creator>
      <dc:date>2013-09-25T18:23:43Z</dc:date>
    </item>
    <item>
      <title>Re: Avg Days in Que</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544021#M481776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe you could post a qvw with sample of your data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 18:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544021#M481776</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2013-09-25T18:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Avg Days in Que</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544022#M481777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good Idea Let me set some data up.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 18:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544022#M481777</guid>
      <dc:creator>kstroupe</dc:creator>
      <dc:date>2013-09-25T18:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Avg Days in Que</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544023#M481778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you wanted to generate weekly rows for each defect, you could do it using the WHILE Clause - something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;Defect,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;week_beg_dt + 7*(IterNo() - 1) as DefectWeek,&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;resident ...&lt;/P&gt;&lt;P&gt;WHILE week_beg_dt + 7*(IterNo() - 1) &amp;lt;= week_end_dt&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IterNo() is the function that returns the iteration number, beginning with 1.&lt;/P&gt;&lt;P&gt;WHILE clause will cause QlikView to create multiple rows as long as the condition is true&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will obviously enlarge your table (I hope your data volumes allow that), but your on-line performance should improve and you won't need to use any complex Set Analysis.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Oleg Troyansky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Sep 2013 19:04:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-Days-in-Que/m-p/544023#M481778</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2013-09-25T19:04:26Z</dc:date>
    </item>
  </channel>
</rss>

