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

An account that calculates Daily Revenue by taking three months of Total Revenue and dividing it down to a daily amount

 

'Calculate Daily Revenue

'Get Text1 priority from current Scenario to learn which Scenario to copy prior data from
Dim priorScenario As String = api.Scenario.Text(api.Pov.Scenario.MemberPK.MemberId, 1) 
Dim srcPov As String = "A#YourTotalRevenueAccount:F#Top:I#Top:V#Periodic" 
Dim srcInputs As String = String.Empty 

Select Case Right(api.Pov.Time.Name, 2)     
     Case "M1"     
          srcInputs = srcPov & ":S#" & priorScenario & ":T#PovPriorYearM11 +" & _        
          srcPov & ":S#" & priorScenario & ":T#PovPriorYearM12 +" & _        
          srcPov    
     Case "M2"     
          srcInputs = srcPov & ":S#" & priorScenario & ":T#PovPriorYearM12 +" & _        
          srcPov & ":T#PovPrior1 +" & _        
          srcPov    
     Case Else     
          srcInputs = srcPov & ":T#PovPrior2 +" & _        
          srcPov & ":T#PovPrior1 +" & _        
          srcPov   
End Select      

api.Data.Calculate("A#YourDailyRevenueAccount:F#None:I#None:V#YTD = (((" & srcInputs & ")/3)*12/365)")
Version history
Last update:
‎04-07-2022 01:51 PM
Updated by:
Contributors