11-16-2023 03:50 PM - last edited on 11-28-2023 02:13 PM by JackLacava
I am trying to do a calculation for a few specified members (putting to E and U4) but only for base of certain hierarchies under Account and UD1.
Here is the example of what we want to do: api.Data.Calculate("E#NonRolled:O#BeforeElim:F#EndBal:U4#NonRolled_Calc = RemoveZeros(E#1000X:O#BeforeElim:F#EndBal:U4#Reported - E#2000X:O#BeforeElim:F#EndBal:U4#Reported )","A#Management_Income_Statement.base")
However, I understand you can not have Entity as part of the left hand side the equation since it would create an invalid data unit. Does anyone know a way around this, or an alternate way to accomplish this?
11-17-2023 03:21 AM
Hi,
you can place your calculation within if condition,
Dim curEntity As String = api.Pov.Entity.Name
If curEntity.XFEqualsIgnoreCase("NonRolled") Then
api.Data.Calculate("O#BeforeElim:F#EndBal:U4#NonRolled_Calc = RemoveZeros(E#1000X:O#BeforeElim:F#EndBal:U4#Reported - E#2000X:O#BeforeElim:F#EndBal:U4#Reported )","A#Management_Income_Statement.base")
End If