Skip to main content
Newcomer
Feb 5, 2024 2:51 PM UTC

FDX Prior Quarter

Hello Community, Is there any functions in Business Rule which is related to T#QuarterPrior1...?
I'm getting only this following function, 
Dim timeMemberIdPrQua As Integer = TimeDimHelper.GetLastPeriodInPriorQuarter(timeMemberId)

So can you please help me to get this...!

1 reply

OneStream Employee
Feb 5, 2024 10:04 PM UTC

Something like this should work. Just be sure to swap out the BRApis for APIs if in a finance rule or member formula.

Dim currentTimeId As Integer = BRApi.Finance.Time.GetIdFromName(si, "2024M9")
Dim currentQuarterId As Integer = BRApi.Finance.Time.ConvertIdToClosestIdUsingAnotherFrequency(si, currentTimeId, Frequency.Quarterly)
Dim priorQuarterID As Integer = BRApi.Finance.Time.GetPriorPeriod(si, currentQuarterId)
Dim priorQuarterName As String = BRApi.Finance.Time.GetNameFromId(si, priorQuarterId)