Thank you, that makes it clear!
The first row does not work because YearPrior1() needs a full time string in the brackets I believe, e.g. YearPrior1(|POVTime|) or YearPrior1(|WFTime|), not just a year, unless the input frequency is yearly. But I have not tested that. Also the Period() function needs the same parameter I believe, e.g. T#YearPrior1(|POVTime|)Period(|POVTime|).
Not sure why you'd want to hard-code "M12"? I thought you need to flexibly pull the previous 12 periods for you max amount? To only use the last period of the previous year, T#PovLastInYearPrior1 can be used.
Dim dAmount_1 As Decimal = api.Data.GetDataCell("T#[YearPrior1(|!Param_Select_Time_Year!|)][Period(M12)]:U8#None").CellAmount
This one can definitely not work.
Dim dAmount_2 As Decimal = api.Data.GetDataCell("T#[|!Param_Select_Time_Year!|.base]:U8#None").CellAmount
GetDataCell needs single a specified data point to get the data cell from. By using ".base", you are telling the system to look for (I assume) 12 different data cells in 12 different data units.
You will either have to loop through each period, or just do it manually. As looping does not add any performance benefits in this case, I would in your case just use the simple way, even if it means a few more rows of code.
Dim dAmount_1 As Decimal = api.Data.GetDataCell("T#PovPrior1:U8#None").CellAmount
Dim dAmount_2 As Decimal = api.Data.GetDataCell("T#PovPrior2:U8#None").CellAmount
Dim dAmount_3 As Decimal = api.Data.GetDataCell("T#PovPrior4:U8#None").CellAmount
'...add rows for amounts 4-11...
Dim dAmount_12 As Decimal = api.Data.GetDataCell("T#PovPrior12:U8#None").CellAmount
With this you will get the amounts for the previous 12 periods into your array and the function will return the maximum value out of those 12. So in your CV which you shared a screenshot of, you will want to select T#2023M6 to use this for your dynamic member. The dynamic member will use that time and then return the max amount of the previous 12 periods, regardless of the year (i.e. dAmount_6 will be getting the amount from December 2022 etc.).