<?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: How to calculate the weighted Average for receivables? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453093#M35631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider Total_amount as trx id. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Nov 2017 15:44:51 GMT</pubDate>
    <dc:creator>mohan_1105</dc:creator>
    <dc:date>2017-11-11T15:44:51Z</dc:date>
    <item>
      <title>How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453084#M35622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;!Hi Qliker,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am calculating the weighted average of date difference by an amount for any dimensions. The formula I wanted to use is,&lt;/P&gt;&lt;P&gt;Days = Sum((Date - Receipt Date) * Amount) / Total amount received.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I used is as follows,&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr((sum(Aggr(((num(RECEIPT DATE) - num(Date))*AMOUNT),AMOUNT)) / TOTAL_AMOUNT),AMOUNT,%Dimension))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There is a mismatch with the arrived value.&lt;/P&gt;&lt;P&gt;After an excel workout, I found that, if the "AMOUNT" and "TOTAL_AMOUNT" are same the expression gives 0 as the value.&lt;/P&gt;&lt;P&gt;I couldn't understand what went wrong to fix the expression to get a correct value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance !!&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 05:29:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453084#M35622</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-11-11T05:29:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453085#M35623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Qlikers,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do we have anything on this to do?&lt;/P&gt;&lt;P&gt;or &lt;/P&gt;&lt;P&gt;should I need to put the question in any other way?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance !!&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 06:39:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453085#M35623</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-11-11T06:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453086#M35624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Please try using the below expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Avg(((Date - Receipt Date)*Amount)/Total amount Received)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Many Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Karthik&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 07:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453086#M35624</guid>
      <dc:creator>karthikoffi27se</dc:creator>
      <dc:date>2017-11-11T07:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453087#M35625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Karthik,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried your expression still no luck. For your convenience I have attached the qvf file. Please consider.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 09:25:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453087#M35625</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-11-11T09:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453088#M35626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share your Excel file?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 13:03:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453088#M35626</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-11T13:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453089#M35627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Excel file is now attached to this thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 13:14:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453089#M35627</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-11-11T13:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453090#M35628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to work&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(((RECEIPTDATE-Date)*AMOUNT)/TOTAL_AMOUNT)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 13:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453090#M35628</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-11T13:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453091#M35629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This expression is valid when I have a single receipt date for a trx id. In some cases, data has multiple receipt date. For those cases, I have to add the weighted avg, to be more clear,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(receipt date 1 - date)*Amount&lt;/P&gt;&lt;P&gt;+ &lt;SPAN style="font-size: 13.3333px;"&gt;(receipt date 1 - date)*Amount &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;-----------------------------------&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;=Addition &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Addition / Total&lt;SPAN style="font-size: 10pt;"&gt; received amount = My Average.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried to replicate the same with the expression it workes fine for the trx id having multiple received date, but for the trx id with a single receipt date expression gives the value 0.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 15:06:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453091#M35629</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-11-11T15:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453092#M35630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see no trx id in your attached app. No idea what you are talking about &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 15:38:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453092#M35630</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-11T15:38:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453093#M35631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider Total_amount as trx id. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 15:44:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453093#M35631</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-11-11T15:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453094#M35632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hahahaha how can I consider Amount to be id? Lol... anyways where do you see 0? Example selection?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 15:50:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453094#M35632</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-11T15:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453095#M35633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Each trx id has a unique Total amount. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example selection Days = -290&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mohan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 16:08:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453095#M35633</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-11-11T16:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453096#M35634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope the attached excel explains clearly what I am expecting to do. Kindly help me to get the value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your time so far.&lt;/P&gt;&lt;P&gt;Mohan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 17:29:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453096#M35634</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-11-11T17:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453097#M35635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr(Sum(Aggr(([Received Date] - Date)*Amount, GROUP, [TRX ID], [Received Date]))/Sum(Amount), GROUP, [TRX ID]))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Nov 2017 18:27:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453097#M35635</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-11-11T18:27:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to calculate the weighted Average for receivables?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453098#M35636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bingo, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, Sunny. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&amp;nbsp; Also, I got bit learning about aggr function from your expression.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Nov 2017 04:21:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-calculate-the-weighted-Average-for-receivables/m-p/1453098#M35636</guid>
      <dc:creator>mohan_1105</dc:creator>
      <dc:date>2017-11-12T04:21:22Z</dc:date>
    </item>
  </channel>
</rss>

