6 Replies Latest reply: Feb 16, 2017 12:58 PM by ALEN ARUTYUNYAN RSS

    Text Box Average calculation


      Hi Guys,


      I was wondering if anyone can assist me with a script.  I am not sure what I am doing wrong but what I am trying to accomplish is an overall average over/under calculation of all of my real estate locations. 


      So for each location, I have current rents (LeaseType) and for each of those locations, I have market rates (New SP - Rental Rates).  The formula below accurately calculates the change between current rent vs market rent in a percentage format for each location I select; however, it does not calculate an average of all locations when no location is selected. 


      Is there a way to utilize this formula to calculate an average for all the locations in a text box?


      Sorry if I have not asked this question in the appropriate location as this is my first time in this forum.   


      =num(((((sum({$<LeaseTypeExpenses = {Lease}, Expense = {"*"}-{"VAT","Parking","Free Rent"}, ExpenseMonth = {$(vThisMonth)}>} if(ExpenseYear = $(vThisYear), Amount)))/sum(Size))*12))/

      (sum([Rental Rates]*[Units per USD])/if([Unit of Measurement] <> 'SQFT', $(vSQMtoSQFT), 1))-1,'#,##0.00%')