API for calling a parameter
Dear Community -
I'm building a dynamic prior year formula for my Variance Cube view. However I want to pull the MonthNo (e.g. M10) from the parameter I have |!SelectCol1Period!| so that it can reference the accurate period based on selected by user period. Currently it pulls the PY from POV instead of what the user has selected as his time period.
Wondering if their is an API function to call a parameter?
Here is the code I'm working with:
Dim SelectedTimeMonth As Integer = api.Time.GetPeriodNumFromId(api.pov.Time.MemberId)
Dim SelectedTimeYear As Integer = api.Time.GetYearFromId(api.Pov.Time.memberid)
Dim PYTime As String = (SelectedTimeYear - 1) & "M" & SelectedTimeMonth
Dim Amount As Decimal = api.Data.GetDataCell("U8#None:T#" & PYTime).CellAmount
Return Amount
Here is the front page of my cube view:
Let me if I can answer any questions.
Thanks for the help.