BWHITAKER
2 months agoNew Contributor II
UD8 Formula which checks if Base Member
Hi!
New to Vb.Net here.
Trying to write a UD8 formula which extracts the right 3 characters of an Entity member name, only when the member is a base member.
Error message received says "'IsBase...
- 2 months ago
Hi, most typically, one checks for base entities using this:
If Not Api.Entity.HasChildren() Then
Mostly, one wants to only execute a calculation on a base entity in local currency (= C#Local), so one would use this:
If (Not Api.Entity.HasChildren()) AndAlso Api.Cons.IsLocalCurrencyForEntity() Then
But the latter is mostly used for stored data to unnecessarily avoid recalculation of data where it already exists anyway through consolidation.
Adding this for the wider audience, one can also check is a member in a given dimension is a base member using Api.Members.IsBase(), e.g.:
Api.Members.IsBase(Api.Pov.EntityDim.DimPk, DimConstants.Root, Api.Pov.Entity.MemberId, Nothing)