Solved
Looking for function to derive prior quarter based on the year and month value passed from parameter
Looking for function in the business rules to derive prior quarter based on the year and month value passed from parameter?
Looking for function in the business rules to derive prior quarter based on the year and month value passed from parameter?
A good way to derive a time period based on a time variable is to use the TimeDimHelper class.
You can nest functions like below; to achieve most use cases.
' Declare timePeriod
Dim timePeriod As String = "2024M1"
' Derive prior quarter based on time passed in
Dim priorQuarterPeriod As String = TimeDimHelper.GetNameFromId(TimeDimHelper.GetQuarterIdFromId(TimeDimHelper.GetLastPeriodInPriorQuarter(TimeDimHelper.GetIdFromName(timePeriod))))
' Log
BRApi.ErrorLog.LogMessage(si, "PriorQuarter Logging: ", priorQuarterPeriod)
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.