<?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: Average Stock in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536568#M556750</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to put the expression or please type the expression in your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understood the logic what you have told, but regarding the day(vdate), i dont know how to put in the set...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please reply with the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 04 Jul 2013 15:02:45 GMT</pubDate>
    <dc:creator>kalyandg</dc:creator>
    <dc:date>2013-07-04T15:02:45Z</dc:date>
    <item>
      <title>Average Stock</title>
      <link>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536566#M556748</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;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have developed Inventory application, and i brought closing stock value as of now date.&lt;/P&gt;&lt;P&gt;But I need to bring the average stock value, by the following method&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Closing Stock(whole stock value for a month)/No. of Days&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my closing stock expression &lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date={"&amp;lt;=$(vDate)"}, FinYear=, FinMonth=, Date=, EntryType={Purchase}&amp;gt;} Stock)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;(sum({&amp;lt;Date={"&amp;lt;=$(vDate)"}, FinYear=, FinMonth=, Date=, EntryType={Sales}&amp;gt;} Stock))&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date={"&amp;lt;=$(vDate)"}, FinYear=, FinMonth=, Date=, EntryType={Damage}&amp;gt;} Stock)&lt;/P&gt;&lt;P&gt;+&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date={"&amp;lt;=$(vDate)"}, FinYear=, FinMonth=, Date=, EntryType={Return}&amp;gt;} Stock)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---vDate = max(Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the avg stock, my expression is as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;above cl.stock expression / count(distinct Date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but the avg values arrived are wrong, b'coz, in my expr. i used max date, so if i select any year, month...&lt;/P&gt;&lt;P&gt;stock value shows the respective monthend date cl.stock....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so the avg calculates by taking the cl.stock value and divide by no. of days selected, but it should not be like this....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg should be arriving by this type&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;calculate the stock sum of whole selected month and divide it by no. of days&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;can anyone please help me..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;its very urgent...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Thanks in Advance to everyone who ever reply to me...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12.0pt; font-family: 'Times New Roman','serif';"&gt;Kalyan&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 14:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536566#M556748</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2013-07-03T14:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Average Stock</title>
      <link>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536567#M556749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kalyan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you shouldn't use Date field selection multiple times in your set modifier, since you set Date according your variable, remove the 'Date=, ' part in your set expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you need to know the day number of your max date within the month to calculate your average, you can also just use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=day(vDate)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Jul 2013 18:40:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536567#M556749</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2013-07-03T18:40:04Z</dc:date>
    </item>
    <item>
      <title>Re: Average Stock</title>
      <link>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536568#M556750</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know how to put the expression or please type the expression in your reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I understood the logic what you have told, but regarding the day(vdate), i dont know how to put in the set...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please reply with the expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 15:02:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536568#M556750</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2013-07-04T15:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Average Stock</title>
      <link>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536569#M556751</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want AVERAGE_STOCK = STOCK_AT_THE_END_OF_EACH_DAY / NO_OF_DAYS then you have two choises:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. Create a separate time line (independent) and use it to calculate stock at the end of each day (heavy-duty calculation in interface when used, suited for a large number of transactions)&lt;/P&gt;&lt;P&gt;2. Calculate in script all the stocks at the end of each day in a separate table and read the values from it (suited for a smaller number of transactions)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Jul 2013 15:20:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536569#M556751</guid>
      <dc:creator>luciancotea</dc:creator>
      <dc:date>2013-07-04T15:20:40Z</dc:date>
    </item>
    <item>
      <title>Re: Average Stock</title>
      <link>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536570#M556752</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;&lt;/P&gt;&lt;P&gt;i had calculated the average by using the following expression&lt;/P&gt;&lt;P&gt;rangesum(above(total Stock, 0, rowno(Total)))/count(distinct date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the expression produce the average correctly, only when we use date field as a dimension.&lt;/P&gt;&lt;P&gt;If i remove date from dimension, the average calculates as i had told in the original discussion&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. average takes max.date stock and divide the no. of days selected&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so again am stucked for a long while.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help me to solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance,&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Jul 2013 08:49:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536570#M556752</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2013-07-09T08:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: Average Stock</title>
      <link>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536571#M556753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Swuehl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had tried without using the date in set expressions. but it is not yet solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;please help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Kalyan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 10 Jul 2013 06:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-Stock/m-p/536571#M556753</guid>
      <dc:creator>kalyandg</dc:creator>
      <dc:date>2013-07-10T06:00:52Z</dc:date>
    </item>
  </channel>
</rss>

