cancel
Showing results for 
Search instead for 
Did you mean: 
OSAdmin
Community Manager
Community Manager

An account that calculates Annualized Revenue by taking three months of Total Revenue and dividing it down to a monthly amount then multiplying by 12

 

'Calculate Annualized Revenue

Return api.data.GetDataCell("(A#TOTREV:I#Top:U1#Top:V#Trailing3MonthTotal / 3) * 12") 

'Get Text1 property from current Scenario
Dim priorScenario As String = api.Scenario.Text(1) 
Dim objTimeMemberSubComponents As TimeMemberSubComponents = BRApi.Finance.Time.GetSubComponentsFromName(si, api.Pov.Time.Name)
Dim periodNum As String = "M" & objTimeMemberSubComponents.Month.ToString

Select Case periodNum   
     Case "M1"    
          Return api.Data.GetDataCell("((A#TOTREV:U1#Top:V#Periodic:I#Top" & _             
          " + A#TOTREV:U1#Top:V#Periodic:I#Top:S#" & priorScenario & ":T#PovPrior1" & _             
          " + A#TOTREV:U1#Top:V#Periodic:I#Top:S#" & priorScenario & ":T#PovPrior2)" & _             
          " / 3)*12")   
     Case "M2"    
          Return api.Data.GetDataCell("((A#TOTREV:U1#Top:V#Periodic:I#Top" & _             
          " + A#TOTREV:U1#Top:V#Periodic:I#Top:T#PovPrior1" & _             
          " + A#TOTREV:U1#Top:V#Periodic:I#Top:S#" & priorScenario & ":T#PovPrior2)" & _             
          " / 3)*12")   
     Case Else    
          Return api.Data.GetDataCell("((A#TOTREV:U1#Top:V#Trailing3MonthTotal:I#Top /3) * 12)")               End Select
Version history
Last update:
‎04-07-2022 01:50 PM
Updated by:
Contributors