Skip to main content
Member
August 27, 2026
Solved

Applying formula to base level member accounts

  • August 27, 2026
  • 1 reply
  • 45 views

Hi Folks,

In one of my UD2 member , i am trying to apply a specific value of [0] to all base level members of A802 account and a completely different set of values [3000] to all other base level accounts that exist in the A4 account hierarchy. 

The hierarchy structure is as follows:

A4

---A5

----A501

----A502

---A8

----A801

----A802

-------A8xxxx

------A8xxxx1

----A803

The issue i face is currently all accounts are coming out with a zero, does anyone know a better way to apply two different type formulas to two different set of base level accounts and allow for natural aggregation of parent values? My logic is as follows: 

 

                    Dim accountDimPk As DimPk = api.Pov.AccountDim.DimPk
                    Dim currentAccountId As Integer = api.Pov.Account.MemberId

                    Dim isParent As Boolean = BRApi.Finance.Members.HasChildren( _
                        si, _
                        accountDimPk, _
                        currentAccountId, _
                        Nothing)

                    If isParent Then
                        Return Nothing
                    End If

                    Dim a802Id As Integer = api.Members.GetMemberId( _
                        dimTypeID.Account, _
                        "A802")
                    Dim isBaseMemberOfA802 As Boolean = _
                        api.Members.IsDescendant( _
                            accountDimPk, _
                            a802Id, _
                            currentAccountId)

                    If isBaseMemberOfA802 _
                        OrElse currentAccountId = a802Id Then
                        Return 0

                    Else

                        'All other base-level accounts use the standard logic.
                        Return 3000

                    End If

                End If

Best answer by sameburn

Hi ​@usmali , I responded on your other thread with an example of how to do this e.g. Need help updating member formula calculation for base level accounts | Community

1 reply

sameburnAdvisorAnswer
Advisor
September 1, 2026

Hi ​@usmali , I responded on your other thread with an example of how to do this e.g. Need help updating member formula calculation for base level accounts | Community