====== FedRptAvgBal ====== This is the Federal Report Average Balance function. It returns the daily average balance of a Federal Report line for a given month (or span of months). The daily average balance is calculated by adding the balance at the end of each day in the time span and then dividing by the total number of days in that span. A daily average is calculated for each individual account. This final average is used to determine where an account's balance is reported for accounts whose balances are reported on different lines depending on whether the account has a positive or negative balance. The Federal Reports are accessible from the GL's Main Menu via the button [Fed Rpt Lines]. **WARNING**: This function ignores the day parts of AvgBalDate and StartDate. The function always calculates daily averages beginning with the first day of the starting month and running through the last day of the ending month. **FedRptAvgBal(RptName, LineNum, AvgBalDate, //Company//, //PosNeg//, //StartDate//)** ==== Example Usage ==== * **=FedRptAvgBal("TFR", "SC11", "7/31/2009")** Returns the daily average balance for TFR line SC11 (Total Cash, Deposits, and Investment Securities) during the month of July, 2009. * **=FedRptAvgBal("TFR", "SC26", "6/30/2009", , ,"1/1/2009")** Returns the daily average balance for TFR line SC26 (Total Mortgage Loans) during the first two quarters of 2009. * Note the two extra commas between the AvgBalDate and the StartDate. Those must be included because the Company and PosNeg parameters are not specified. * **=FedRptAvgBal("Call", "RI-4518", "3/17/2009", , "D", "10/22/2008")** Returns 'Credit Balance' because the daily average balance for line RI-4518 of Federal Report "Call" for the last quarter of 2008 and first quarter of 2009 is a debit balance. The "D" in our formula told Excel to only display the balance if it was a debit. See below for more information about the PosNeg parameter. ==== Required Paramaters ==== {{section>parameters#rptname}} {{section>parameters#linenum}} {{section>parameters#avgbaldate}} ==== Optional Parameters ==== {{section>parameters#company}} {{section>parameters#posneg}} {{section>parameters#startdate}}