<?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 Help getting average balance by AccountNumber/month+year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632643#M732342</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have the following table with end of day account balance:&lt;/P&gt;&lt;P&gt;AccountNumber&lt;BR /&gt;Bal_Date (ex 9/1/2019)&lt;BR /&gt;Balance&lt;/P&gt;&lt;P&gt;Here is a small sample of data:&lt;/P&gt;&lt;P&gt;00000000001 - $1000.00 - 8/1/2019 - Aug - 2019&lt;BR /&gt;00000000001 - $900.00 - 8/2/2019 - Aug 2019&lt;/P&gt;&lt;P&gt;00000000001 - $1000.00 - 8/3/2019 - Aug 2019&lt;BR /&gt;00000000001 - $900.00 - 8/4/2019&lt;BR /&gt;-- more for August 2019&lt;BR /&gt;00000000001 - $1000.00 - 9/1/2019 - Sep - 2019&lt;BR /&gt;00000000001 - $1000.00 - 9/2/2019 - Sep - 2019&lt;BR /&gt;00000000001 - $1000.00 - 9/3/2019 - Sep - 2019&lt;BR /&gt;00000000001 - $1000.00 - 9/4/2019 - Sep - 2019&lt;/P&gt;&lt;P&gt;Now I need to create a new table that will hold the average monthly balance for each AccountNumber/Month+Year. Since I will have numerous months worth of data, there will be 1 record for each AccountNumber/Month+Year, like this:&lt;/P&gt;&lt;P&gt;00000000001 - $1000.00 - Aug 2019&lt;BR /&gt;00000000001 - $900.00 - Sep 2019&lt;/P&gt;&lt;P&gt;Since I have millions of records, this seems like a task to be run in the load script but I can't get the above table. I can get the AccountNumber/Month+Year and the AccountNumber+Avg Monthly Balance but not all 3. I've tried many iterations of avg, aggr, etc and still nothing. Here is my latest script. It generates an error but I want to include it to give you an idea of what I am trying to do:&lt;/P&gt;&lt;P&gt;Balance:&lt;BR /&gt;LOAD AccountNumber,&lt;BR /&gt;Bal_Date,&lt;BR /&gt;Balance,&lt;BR /&gt;Month(Bal_Date) as BalanceMonthName,&lt;/P&gt;&lt;P&gt;Year(Bal_Date) as BalanceYearName&lt;BR /&gt;FROM [Data\Up To 10-04-2019\Balance.qvd] (qvd);&lt;/P&gt;&lt;P&gt;// Calculate avg monthly balance by month/customer.&lt;BR /&gt;AverageCustomerBalance:&lt;BR /&gt;Load Distinct AccountNumber,&lt;BR /&gt;BalanceMonthName,&lt;BR /&gt;BalanceYearName,&lt;BR /&gt;Avg(Balance) as AverageMonthlyBalance&lt;BR /&gt;Resident Balance&lt;BR /&gt;group by AccountNumber;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>meckeard</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Help getting average balance by AccountNumber/month+year</title>
      <link>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632643#M732342</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have the following table with end of day account balance:&lt;/P&gt;&lt;P&gt;AccountNumber&lt;BR /&gt;Bal_Date (ex 9/1/2019)&lt;BR /&gt;Balance&lt;/P&gt;&lt;P&gt;Here is a small sample of data:&lt;/P&gt;&lt;P&gt;00000000001 - $1000.00 - 8/1/2019 - Aug - 2019&lt;BR /&gt;00000000001 - $900.00 - 8/2/2019 - Aug 2019&lt;/P&gt;&lt;P&gt;00000000001 - $1000.00 - 8/3/2019 - Aug 2019&lt;BR /&gt;00000000001 - $900.00 - 8/4/2019&lt;BR /&gt;-- more for August 2019&lt;BR /&gt;00000000001 - $1000.00 - 9/1/2019 - Sep - 2019&lt;BR /&gt;00000000001 - $1000.00 - 9/2/2019 - Sep - 2019&lt;BR /&gt;00000000001 - $1000.00 - 9/3/2019 - Sep - 2019&lt;BR /&gt;00000000001 - $1000.00 - 9/4/2019 - Sep - 2019&lt;/P&gt;&lt;P&gt;Now I need to create a new table that will hold the average monthly balance for each AccountNumber/Month+Year. Since I will have numerous months worth of data, there will be 1 record for each AccountNumber/Month+Year, like this:&lt;/P&gt;&lt;P&gt;00000000001 - $1000.00 - Aug 2019&lt;BR /&gt;00000000001 - $900.00 - Sep 2019&lt;/P&gt;&lt;P&gt;Since I have millions of records, this seems like a task to be run in the load script but I can't get the above table. I can get the AccountNumber/Month+Year and the AccountNumber+Avg Monthly Balance but not all 3. I've tried many iterations of avg, aggr, etc and still nothing. Here is my latest script. It generates an error but I want to include it to give you an idea of what I am trying to do:&lt;/P&gt;&lt;P&gt;Balance:&lt;BR /&gt;LOAD AccountNumber,&lt;BR /&gt;Bal_Date,&lt;BR /&gt;Balance,&lt;BR /&gt;Month(Bal_Date) as BalanceMonthName,&lt;/P&gt;&lt;P&gt;Year(Bal_Date) as BalanceYearName&lt;BR /&gt;FROM [Data\Up To 10-04-2019\Balance.qvd] (qvd);&lt;/P&gt;&lt;P&gt;// Calculate avg monthly balance by month/customer.&lt;BR /&gt;AverageCustomerBalance:&lt;BR /&gt;Load Distinct AccountNumber,&lt;BR /&gt;BalanceMonthName,&lt;BR /&gt;BalanceYearName,&lt;BR /&gt;Avg(Balance) as AverageMonthlyBalance&lt;BR /&gt;Resident Balance&lt;BR /&gt;group by AccountNumber;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632643#M732342</guid>
      <dc:creator>meckeard</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help getting average balance by AccountNumber/month+year</title>
      <link>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632646#M732343</link>
      <description>&lt;P&gt;I figured this out about 10 minutes after posting (see&amp;nbsp; below) although I'm open to suggestions for better ways to do it:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;AverageCustomerBalance:&lt;BR /&gt;LOAD distinct AccountNumber,&lt;BR /&gt;Avg(Balance) as AverageBalance,&lt;BR /&gt;month(Bal_Date) as MonthName,&lt;BR /&gt;year(Bal_Date) as YearName&lt;BR /&gt;Resident Balance&lt;BR /&gt;GROUP BY AccountNumber,&lt;BR /&gt;month(Bal_Date),&lt;BR /&gt;year(Bal_Date);&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 16:19:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632646#M732343</guid>
      <dc:creator>meckeard</dc:creator>
      <dc:date>2019-10-08T16:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: Help getting average balance by AccountNumber/month+year</title>
      <link>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632647#M732344</link>
      <description>that looks allright. but why do you want to do this in script?&lt;BR /&gt;Why not do this in a chart?</description>
      <pubDate>Tue, 08 Oct 2019 16:21:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632647#M732344</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-10-08T16:21:41Z</dc:date>
    </item>
    <item>
      <title>Re: Help getting average balance by AccountNumber/month+year</title>
      <link>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632697#M732345</link>
      <description>&lt;P&gt;I couldn't get it to work in a chart and with millions of records, I thought it would be more efficient doing it in the load script.&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 18:29:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632697#M732345</guid>
      <dc:creator>meckeard</dc:creator>
      <dc:date>2019-10-08T18:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help getting average balance by AccountNumber/month+year</title>
      <link>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632705#M732346</link>
      <description>&lt;P&gt;it would be faster but less flexible if you do in script e.g. if you want to filter this average by some other dimension.&lt;/P&gt;&lt;P&gt;But as this is at a i think low granular level&amp;nbsp; (account number) it should be ok.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It should work front end. What did you try?&lt;/P&gt;&lt;P&gt;p.s. million rows is generally easily handled by qlik&lt;/P&gt;</description>
      <pubDate>Tue, 08 Oct 2019 18:46:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-getting-average-balance-by-AccountNumber-month-year/m-p/1632705#M732346</guid>
      <dc:creator>dplr-rn</dc:creator>
      <dc:date>2019-10-08T18:46:21Z</dc:date>
    </item>
  </channel>
</rss>

