<?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 for limited values in straighttable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Avg-for-limited-values-in-straighttable/m-p/740808#M1043265</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alwin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use Set Analysis to achieve that.&lt;/P&gt;&lt;P&gt;If your dimension is for example the invoice number, the expression to calculate the days between the two dates only for those values that have 'Closed' as their status can be:&lt;/P&gt;&lt;P&gt;1. i&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;f you want to calculate without excluding any holidays&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Only({$ &amp;lt;Status={Closed}&amp;gt;} fabs(ClosingDate - CreateDate))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if you want to calculate just working days, then use:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;=Only({$ &amp;lt;Status={Closed}&amp;gt;} fabs(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Networkdays(&lt;/SPAN&gt;ClosingDate - CreateDate)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you want to calculate the average value (of days between the two days?) per salesperson, for example in another straight table with the Salesperson number as a dimension you can use:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Avg({$ &lt;STRONG&gt;&amp;lt;Status={Closed}&amp;gt;&lt;/STRONG&gt;} fabs(&lt;STRONG&gt;ClosingDate - CreateDate&lt;/STRONG&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Below I attached an example, I hope it is clear.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/72330_Capture.PNG.png" style="width: 620px; height: 204px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Giacomo&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 28 Nov 2014 09:59:55 GMT</pubDate>
    <dc:creator>giacomom</dc:creator>
    <dc:date>2014-11-28T09:59:55Z</dc:date>
    <item>
      <title>Avg for limited values in straighttable</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-for-limited-values-in-straighttable/m-p/740807#M1043264</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;Need some help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 2 tables:&lt;/P&gt;&lt;P&gt;- Salesperson (Id, name)&lt;/P&gt;&lt;P&gt;- Orders (linked to Salesperson table, CreateDate, ClosingDate, Status = Open or Closed)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i want a straightTable, with only values from closed orders.&lt;/P&gt;&lt;P&gt;And for these values i want to know the days between closingDate Vs. CreateDate.&lt;/P&gt;&lt;P&gt;Actually, the average value per salesperson.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can i achieve this properly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;A.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 08:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-for-limited-values-in-straighttable/m-p/740807#M1043264</guid>
      <dc:creator>alwinsch</dc:creator>
      <dc:date>2014-11-28T08:19:23Z</dc:date>
    </item>
    <item>
      <title>Re: Avg for limited values in straighttable</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-for-limited-values-in-straighttable/m-p/740808#M1043265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alwin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you can use Set Analysis to achieve that.&lt;/P&gt;&lt;P&gt;If your dimension is for example the invoice number, the expression to calculate the days between the two dates only for those values that have 'Closed' as their status can be:&lt;/P&gt;&lt;P&gt;1. i&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;f you want to calculate without excluding any holidays&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Only({$ &amp;lt;Status={Closed}&amp;gt;} fabs(ClosingDate - CreateDate))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;2. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;if you want to calculate just working days, then use:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;=Only({$ &amp;lt;Status={Closed}&amp;gt;} fabs(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Networkdays(&lt;/SPAN&gt;ClosingDate - CreateDate)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you want to calculate the average value (of days between the two days?) per salesperson, for example in another straight table with the Salesperson number as a dimension you can use:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =Avg({$ &lt;STRONG&gt;&amp;lt;Status={Closed}&amp;gt;&lt;/STRONG&gt;} fabs(&lt;STRONG&gt;ClosingDate - CreateDate&lt;/STRONG&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Below I attached an example, I hope it is clear.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/72330_Capture.PNG.png" style="width: 620px; height: 204px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Giacomo&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 09:59:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-for-limited-values-in-straighttable/m-p/740808#M1043265</guid>
      <dc:creator>giacomom</dc:creator>
      <dc:date>2014-11-28T09:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Avg for limited values in straighttable</title>
      <link>https://community.qlik.com/t5/QlikView/Avg-for-limited-values-in-straighttable/m-p/740809#M1043266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is it this simple, i tought i had to use something with aggr function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Alwin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Nov 2014 13:57:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Avg-for-limited-values-in-straighttable/m-p/740809#M1043266</guid>
      <dc:creator>alwinsch</dc:creator>
      <dc:date>2014-11-28T13:57:37Z</dc:date>
    </item>
  </channel>
</rss>

