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!19Views0likes2CommentsCreate a parameter to determine the initialization status of each forecast?
Hello everyone, We have set up a monthly forecast that is compared to the budget or actual figures in different cube views. We currently use a parameter to select the forecast month in each cube view, but I would like to remove it and have the latest forecast for the year or year N-1 displayed automatically. I have created an XFBR that retrieves the holding company's turnover for each of the 11 forecasts (January, February, etc., November) and displays the forecast closest to December with a turnover. The problem is that not all users have access to this company, so the BR does not work for them. I could change the BR to add companies to it so that it works for all users, but I find that cumbersome. Is it possible to save a value (X or 1) in a variable when initializing the forecast so that the BR can query this variable based on the Time scenario and thus know which forecast has been initialized? How do you do this in your OS?37Views0likes3CommentsCalculation in Scenario member
I am trying to calculate Average Percent Period Movement (AVPPM) — i.e.: AVPPM=Actuals(Current)−Actuals(Prior Period) / ∣Actuals(Prior Period)∣×100 = and store the result in S#AVPPM for the current POV. I tried using the below script in Business rule or Scenario member formula for S#AVPPM but not getting the correct result. api.Data.Calculate("S#AVPPM = (S#Actuals - (S#Actuals:T#POVPrior1)) / (ABS(S#Actuals:T#POVPrior1))*100", True) Appreciate any help!34Views0likes2Commentsaccount is not translating
Good afternoon, I need help with translating a balance account. We set it up to calculate job to date and load its local currency value, then I wanted to translate it using a job to date rate (also setup as the balance account). The formula attached to the account is for every foreign base entity executes this: api.Data.Calculate("A#JTD_COST:V#YTD:F#EndBalLoad:U8#None:C#USD = RemoveZeros(A#JTD_COST:V#YTD:F#EndBalLoad:U8#None:C#Local * A#JTD_FX_RATE:V#YTD:F#EndBalLoad:U8#None:C#Local)",,,,,"U1#Active.base") The problem is that when I set the original account with Formula Pass then I get an error during the consolidation suggesting the invalid destination data unit in script. When I don't attach any Formula Pass then nothing happens at all. Any suggestions what I miss or how else balance accounts can be translated? Thank you, Ola80Views0likes4CommentsUse Data Adapter in a Different Workspace
I'm looking copy an existing data adapter (screenshot below) from the RCM solution into a different workspace and use it within BI Viewer for custom dashboards. I believe the 'GetReconsWithStatusGridView' function is stored within the 'Services' assembly folder and 'ReconService.cs' is the file within the folder that needs called. I have 'Is Shareable Workspace' set to True. Since the method query references WSMU, I need to update that in order to properly call the underlying business rule. That's the part I'm having trouble with. I've tried a wide variety of syntax to no avail. Examples: {Workspace.OFC.RCM}{GetReconsWithStatusGridView}{AccountFilter=...} {Workspace.OFC.RCM.Services}{GetReconsWithStatusGridView}{AccountFilter=...} {Workspace.OFC.RCM.Services.ReconService}{GetReconsWithStatusGridView}{AccountFilter=...} Does anyone know the proper syntax to place in my copied data adapter? Are there any other steps I need to take to properly reference this business rule? Thanks!42Views0likes0CommentsRemovezeros in getdatabuffer
Hi, We have a seeding rule that is copying zeros: sourceActualsBuffer = api.Data.GetDataBuffer(DataApiScriptMethodType.Calculate,S#Actual_Opco:U5#None,False, destinationBuffer) I am trying to change it so it does not include zeros, by applying the removezeros function: sourceActualsBuffer = api.Data.GetDataBuffer(DataApiScriptMethodType.Calculate,"RemoveZeros(S#Actual_Opco:U5#None)",False, destinationBuffer) When I do this, I get an error see attachmement. I tried to change the quotes RemoveZeros("S#Actual_Opco:U5#None") but then i get a different error when validating. Could not find anything in the reference on how to fix this. Anybody can help?Solved2.5KViews0likes3CommentsCall Assembly Business Rule from another Workspace in a Data Management Step
I'm looking to call a business rule that is located in a different workspace within Assemblies but am unsuccessful. The first screenshot below shows my DM step configuration. The business rule I'm trying to call is an out-of-the-box rule within the Financial Close solution. The second screenshot shows the workspace (namespace prefix = OFC), the assembly (RCM) and the business rule (DiscoverRecons). The third screenshot shows the tool tip when you hover over "Business Rules" on the DM step. I've attempted many variations of the yellow highlighted syntax, always returning an invalid business rule error. The fourth screenshot shows the out-of-the-box DM step I'm emulating. I used this to verify the parameters I'm passing in work which they do. I've ensured that both the current workspace and OFC workspaces are sharable and include the shared workspace names. Does anyone know the correct syntax to call this rule into my DM step?131Views0likes7CommentsIf Then Else Statement to return Annotation in UD8
Hello- Is there any reason why the below if , then, else statement is not working correctly? Val2 has data when I only return it in a test dynamic calc, but when incorporated into the below formula, it is reading a zero for Val2. Any help would be greatly appreciated:Solved42Views0likes2CommentsPerform a Translate within a Calculate when copying information.
In a calculation, I'm copying data from one scenario to another. I have no issues with the amounts in local currency, but with the USD currency I do, because it retains the same value as the scenario I'm copying to, instead of the value it should actually have. Dim TimeName As String = BRApi.Finance.Time.GetNameFromId(si, si.WorkflowClusterPk.TimeKey) Dim entity As String = api.Pov.Entity.Name Dim index As Integer = TimeName.indexOf("M") Dim monthNumber As String = TimeName.Substring(index + 1) '1 'api.Data.ClearCalculatedData("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE",True,False,False,True) api.Data.ClearCalculatedData("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE",True,True,True,True) 'BRapi.ErrorLog.LogMessage(si,"Time: " & api.Pov.Time.Name & " entity: " & entity & " currency:" & api.Pov.Cons.Name) 'If ((Not api.Entity.HasChildren()) And (api.Cons.IsLocalCurrencyForEntity())) Then If api.Cons.IsLocalCurrencyForEntity() Then 'api.Data.Calculate("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE = RemoveZeros(FilterMembers(S#[Forecast " & TimeName & "],[A#Root.Base]))") api.Data.Calculate("S#FORECAST_" & monthNumber & "_AT_CY_BUDGET_RATE = RemoveZeros(S#[Forecast " & TimeName & "])") api.Data.Translate(sourceDataBufferScript, destDataBufferScript, End If I use this code when consolidating the target scenario, so I'm not sure if I'm missing something in this section, since in theory the translation should happen automatically during consolidation. I appreciate any support you can give me.44Views0likes1Comment