FilterMembers syntax (: vs ,) and base clearing when using GetDataBufferUsingFormula
I’m working on a custom clear process that clears cube data using GetDataBufferUsingFormula()
The goal is to dynamically clear data for all base members under the current POV (Entity, UD1-UD4) by expanding any parent members with the .Base suffix.
In other words, I want to make sure every dimension in the POV (Entity and UDs alike) is ultimately resolved down to base members before the clear runs.
Here’s a simplified idea of what I’m doing:
Dim filterString As String = String.Join(":", intersectionParts)
Dim fullFilter As String = $"FilterMembers({filterString})"
Dim sourceBuffer As DataBuffer = api.Data.GetDataBufferUsingFormula(fullFilter, DataApiScriptMethodType.Calculate, False, destinationInfo)
The process builds a FilterMembers() expression dynamically, retrieves the buffer, and sets all cell amounts to zero to perform a clear.
However, I’m facing two issues:
- Some child members aren’t being cleared, even when I use .Base on their parent.
- I’m not fully sure about the correct syntax for FilterMembers, should the dimensions be separated by colon (:) or by comma (,)? What’s the real difference between the two, especially when dealing with multiple parent members or nested intersections?
For example, if I have three parent members in my intersection, I might build something like:
FilterMembers(E#MyEntity.Base:U1#ProfitCenter.Base:U2#Location.Base)
But it’s unclear whether that colon syntax is correct, or if it should be comma-separated, or another thing is, the use of square bracket...since some base-level data doesn’t seem to clear.
Could this be a syntax issue with FilterMembers, or could the problem come from how I’m constructing or passing the intersection into GetDataBufferUsingFormula()?
Any clarification or working example for multi-parent .Base expansions with FilterMembers() would be a huge help.
Thanks in advance!