05-17-2023 10:29 AM - last edited on 08-11-2023 11:12 AM by JackLacava
Does anyone know how to write a formula that calculates an average based on the POV's number of days? Thanks
05-17-2023 10:53 AM
you can access the number of days like this:
BrApi.Finance.Time.GetNumDaysInTimePeriod(si, timeId)
or in a finance business rule or member formula:
api.Time.GetNumDaysInTimePeriod(timeId)
05-17-2023 11:01 AM
Thanks Christian! Do you happen to have a sample? Thanks in advance
05-17-2023 12:10 PM - edited 05-18-2023 03:01 AM
Dim timId as Integer = BrApi.Finance.Members.GetMemberId(si, DimTypeId.Id, “2023M1”)
Dim numDays = BrApi.Finance.Time.GetNumDaysInTimePeriod(si, timId)
Dim timId as Integer = api.Members.GetMemberId(DimTypeId.time, “2023”)
Dim numDays as Integer = api.Time.GetNumDaysInTimePeriod(timeId)