12-06-2023 02:15 PM - last edited on 12-06-2023 05:10 PM by JackLacava
Dear Community:
I am trying to add a previous year M12 balance to a SCF report. I can't seem to get prior year data to come over. However, If I code the amount it does work.
' api.Data.calculate("A#CF_RepaymentEquityInvestment = A#CF_RepaymentEquityInvestment + A#33100:T#POVPriorYearM12") does not work
' api.Data.calculate("A#CF_RepaymentEquityInvestment = A#CF_RepaymentEquityInvestment + A#33100:T#2022M12") does not work
' api.Data.calculate("A#CF_RepaymentEquityInvestment = A#CF_RepaymentEquityInvestment + A#33100") does not work
api.Data.calculate("A#CF_RepaymentEquityInvestment = A#CF_RepaymentEquityInvestment + -62225") ' Returns amount as intended
Thanks
12-07-2023 02:54 AM
Hi @Spalomino
The value you have of 62225, can you see it in your cuve view? Did you right click on its cell and analysed the cell POV and all its intersection? Did you do the same for A#CF_RepaymentEquityInvestment?
12-11-2023 10:47 AM
Nicolas: Thanks for responding. Yes, the data [$62,225] is sitting our cube.
12-12-2023 02:37 AM
can you paste here the cell POV intersections for us to see? Did you try to add it this directly in the formulae?
12-13-2023 12:58 PM
Cb#ABG_FinRptg:E#Praxis:P#?:C#Local:S#Actual:T#2023M9:V#YTD:A#CF_RepaymentEquityInvestment:F#StatementChange:O#Top:I#None:U1#CF_Load_BS:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None
=XFGetCell(True, "ABG_FinRptg", "Praxis", "", "Local", "Actual", "2023M9", "YTD", "CF_RepaymentEquityInvestment", "StatementChange", "Top", "None", "CF_Load_BS", "None", "None", "None", "None", "None", "None", "None")
XFCell(Cb#ABG_FinRptg:E#Praxis:C#Local:S#Actual:T#2023M9:V#YTD:A#CF_RepaymentEquityInvestment:F#StatementChange:O#Top:I#None:U1#CF_Load_BS:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None, Culture=User, NumberFormat=N0, DisplayNoDataAsZero=True, Scale=0, FlipSign=False, ShowPercentSign=False, UseApostrophePrefix=False)
12-14-2023 11:51 AM - edited 12-14-2023 11:53 AM
You have to remember that, when using Calculate, you're working with databuffers, not single cells like in GetDataCell. The dimensionality of databuffers has to match, so things like your first attempt are a non-starter: one buffer only has Account specified, and the other has Account and Time.
If you balance the buffer dimensionality, it should work:
api.Data.calculate("A#CF_RepaymentEquityInvestment = A#CF_RepaymentEquityInvestment:T#Pov + A#33100:T#PovPriorYear12")
If not, you should investigate what those buffers actually contain, i.e. if you're ever going to have values in the same intersections on both sides. Check out GetDataBufferUsingFormula and LogDataBuffer for that.
12-14-2023 12:11 PM
Jack:
Thanks for the information. I will pursue the GetDataBuffer and LogDataBuffer approach.
Best