Remove Functions Usage

Example using RemoveZeros in a working formula:

Copy
'Declare variable To Get period number From the current time period
Dim curMonth As Integer = api.Time.GetPeriodNumFromId(api.Pov.Time.MemberId)

'Run for Entity Base Members Only
If (Not api.Entity.HasChildren()) Then

    'Check to see if current month is M1.
    'If so, pull Ending Balances from M12 prior year.  We are using F#None for this exercise
    'If M2 - M12, pull Ending Balances or F#None from prior period in current year
    'Only run the calculation for Balance Sheet base accounts
    'Remove data cells with cell amount of 0 and cell status of NoData
    If curMonth = 1 Then
        api.Data.Calculate("F#BegBalCalcRemove = RemoveZeros(F#None:T#PovPriorYearM12)", "A#[Balance Sheet].Base")
    Else
        api.Data.Calculate("F#BegBalCalcRemove = RemoveZeros(F#BegBalCalc:T#PovPrior1)", "A#[Balance Sheet].Base")
    End If

End If

Example using RemoveNoData in a working formula:

Copy
'Declare variable to get period number from the current time period
Dim curMonth As Integer = api.Time.GetPeriodNumFromId(api.Pov.Time.MemberId)

'Run for Entity Base Members Only
If (Not api.Entity.HasChildren()) Then

    'Check to see if current month is M1.
    'If so, pull Ending Balances from M12 prior year.  We are using F#None for this exercise
    'If M2 - M12, pull Ending Balances or F#None from prior period in current year
    'Only run the calculation for Balance Sheet base accounts
    'Remove data cells with cell status of NoData ONLY
    If curMonth = 1 Then
        api.Data.Calculate("F#BegBalCalcRemove = RemoveNoData(F#None:T#PovPriorYearM12)", "A#[Balance Sheet].Base")
    Else
        api.Data.Calculate("F#BegBalCalcRemove = RemoveNoData(F#BegBalCalc:T#PovPrior1)", "A#[Balance Sheet].Base")
    End If

End If