Pass-thru Formatting on Cube Views
Good afternoon, I'm trying to pass through formatting from one cube view to another. The 2nd cube view is a dialog pop-up in a dashboard triggered by a selection changed event. So far I've been able to determine destination formatting based on Cell POV dimension members of the cell "clicked" but I'm hitting a snag on dynamically calculated cells (column is Actual versus Budget % for example). The Cell POV dimension members are the same with the only difference being a "GetDataCell" at the end. I haven't figured out a way to retrieve what, if anything, is in the "calculation script" for a cell intersection. Or if there's a way to retrieve the row and column names for a cell intersection at the time of a click? Looking for any guidance possible. Thanks, Brandon7Views0likes0CommentsBusiness Rule: Copy data from one cube to another with different cube dimensions
Hello, I have following two cubes in onestream: Volumes Detail All the cube dimensions are the same except for UD1. For volumes, UD1 cube dimension is VintageDim and for detail its FunctionTotal. I am trying to copy data from "Volumes" cube to "Detail" Cube through a Business Rule. I am running this business rule from Data Management Step. The rule runs perfectly but it doesn't copy the data. I don't get any error too. Please can someone help to understand the issue? Public Sub CopyData() Try 'Define the source and target information Dim sourceCube As String = "Volumes" Dim targetCube As String = "Detail" Dim sourceScenario As String = api.Pov.Scenario.Name '1. Pull data from the source cube (Volumes) 'Using a formula to capture the desired data unit Dim sourceDb As DataBuffer = api.Data.GetDataBufferUsingFormula($"Cb#{sourceCube}:S#{sourceScenario}:A#Product_Sales") '2. Convert the data buffer to match the target cube's dimensionality 'This handles the automatic mapping of extended members between the cubes Dim convertedDb As DataBuffer = api.Data.ConvertDataBufferExtendedMembers(targetCube, sourceScenario, sourceDb) '3. Set the converted data into the target cube (Detail) Dim destInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("") api.Data.SetDataBuffer(convertedDb, destInfo) Catch ex As Exception brapi.ErrorLog.LogMessage(si, "EXCEPTION: " & ex.Message) Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End Sub Thank you37Views0likes1CommentTime always returns 0001-01-01 in BR when using XFBR in Cube View
Hi, I am calling a Business Rule (BR) in a Cube View using XFBR as follows: XFBR( BR_ParamHelper, FunctionName, WFname = |WFText2|, SelectEntity = |!WF_AssignedEntity!|, Time = |!Time!| ) Inside the BR, I parse the year from Time to control flows: Dim wfYear As Integer = 0 If args.NameValuePairs.ContainsKey("Time") Then Dim POVTime As String = args.NameValuePairs("Time") wfYear = CInt(Left(POVTime, 4)) End If If wfYear >= 2026 Then ' Remove flows for specified entities Else ' Keep historical flows End If Problem: When I log POVTime or wfYear, it always shows 0001-01-01, so my logic for removing ENT/EXIT based on the year never triggers. What I have tried: Verified the Cube View POV is correctly set. Passed Time = |!Time!| from the Cube View XFBR call. Logged args.NameValuePairs("Time") — still returns 0001-01-01. Question: Is Time = |!Time!| the correct way to pass the POV period to a BR? Is there a difference between |!Time!| and |!POV!| or T#POV in Cube Views for BRs? How can I get the actual workflow year in the BR so I can apply logic like wfYear >= 2026? Any guidance or examples on how to correctly get the year of the workflow/POV in a BR would be greatly appreciated.59Views0likes5CommentsVary description vy user culture in XFBR
Hello, We are facing the following issue, we use the following xfbr to generate accounts in a cubeview rows and retrieve descriptions : XFBR(CCF_XFBR, GetCCFDrillDownWithDescription2,memberExp=[A#CashFlow_Gestion.TreeDescendantsInclusive], Time=|CVTime|). However, the Cube View where this XFBR is applied always displays the descriptions in the default format. The description does not adapt based on the user’s culture settings. How can we make the XFBR return descriptions that vary according to the user culture? For reference, here is the XFBR code : Public Function GetCCFDrillDownWithDescription2(ByVal si As SessionInfo, ByVal globals As BRGlobals, ByVal api As Object, ByVal args As DashboardStringFunctionArgs) As String Try 'Get the Dim PK for Entity Dimension Dim accountDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si,args.SubstVarSourceInfo.WFAccountDim) Dim flowDimPk As DimPk = BRApi.Finance.Dim.GetDimPk(si,args.SubstVarSourceInfo.WFFlowDim) 'Dim memberListClass As New OneStream.BusinessRule.Finance.CCF_FinanceLogics.MainClass Dim memFilterAccounts As List(Of MemberInfo) = BRAPi.Finance.Members.GetMembersUsingFilter(si, accountDimPk, args.NameValuePairs("memberExp"), True) If memFilterAccounts.Count = 0 Then ' brapi.ErrorLog.LogMessage(si,"Cash flow Account Member Not found in CubeView member filter. Check XFBR syntax (GetCCFDrillDown) in Cube view") Return "A#None:F#None:Name(Please check memberfilter in cubeview. Cashflow Account not found)" End If 'Use a text builder to build a string Dim resultString As New Text.Stringbuilder() Dim isfirstItem As Boolean = True ' Dim accountFlowComb As String ' Dim flowBaseMembers As List(Of Member) Dim objDataCellInfoUsingMemberScript As New DataCellInfoUsingMemberScript Dim tftEntityID As Integer = Brapi.Finance.Members.GetMemberId(si,dimTypeId.Entity, "CF") Dim objScenarioType As ScenarioType = BRApi.Finance.Scenario.GetScenarioType(si, args.SubstVarSourceInfo.WFScenario.MemberId) Dim timeReference As String = BRApi.Finance.Entity.Text(si, tftEntityID, 1, objScenarioType.Id, args.SubstVarSourceInfo.WFTime.MemberId) Dim MatrixTime As String = args.NameValuePairs("Time") Dim scenarioReference As String = BRApi.Finance.Entity.Text(si, tftEntityID, 2, objScenarioType.Id, args.SubstVarSourceInfo.WFTime.MemberId) If scenarioReference = String.Empty Then scenarioReference = args.SubstVarSourceInfo.WFScenario.Name Dim cashFlowSettings As DataTable = BRApi.Import.Data.FdxExecuteDataUnit(si, "PARAM_CF", "E#CF", "Local", objScenarioType.Id,"S#" & scenarioReference, "T#" & MatrixTime, "YTD", True, "Amount <> 0", 4, False) 'Dim cashFlowAdj As DataTable = BRApi.Import.Data.FdxExecuteDataUnit(si, "CONSO", "E#CF", "Local", objScenarioType.Id,"S#REEL","T#" & timeReference , "YTD", True, "Amount <> 0", 4, False) 'Exit Function Dim CFSiN As Boolean = cashFlowSettings Is Nothing If cashFlowSettings Is Nothing Then Brapi.ErrorLog.LogMessage(si,"No CashFlow setting found") Return "" 'Exit Function ElseIf cashFlowSettings.Rows.Count = 0 Then Brapi.ErrorLog.LogMessage(si,"No CashFlow setting found") Return "" 'Exit Function End If Dim space As String = String.Empty Dim sign As String = String.Empty Dim AccountDescription As String ' Dim AccountDescription2 As String For Each account As MemberInfo In memFilterAccounts ' brapi.ErrorLog.LogMessage(si,"account " & account.NameAndDescription) space = " " For i = 0 To account.IndentLevel space = space & " " Next 'Exit Function resultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None,") 'resultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None:U7#MT_RETTFT,") ' Cb#CONSO:E#EIMER:P#?:C#Local:S#REEL:T#2022M12:V#YTD:A#RD_T110:F#None:O#Top:I#Top:U1#None:U2#None:U3#Top:U4#None:U5#None:U6#None:U7#MT_RETTFT:U8#CF_CalcAmount 'Ajout des ecritures Dim memberFilter As String = "MT_RETTFT" Dim UD7Desc As String = BRApi.Finance.Metadata.GetMember(si, dimTypeId.UD7,memberFilter).Description 'ResultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None:U7#MT_RETTFT:Name(" & UD7Desc & "),") If Not BRApi.Finance.Members.HasChildren(si, accountDimPk, account.Member.MemberId) Then Dim cashFlowSettingRows() As DataRow = cashFlowSettings.Select("UD7 = '" & account.Member.Name & "' AND UD8 = 'None'") For Each row As DataRow In cashFlowSettingRows AccountDescription = BRApi.Finance.Metadata.GetMember(si, dimTypeId.Account,row("Account")).NameAndDescription If row("Amount") = -1 Then sign = "(-)" 'ResultString.Append("A#" & row("Account") & ":Name( "& space & " " & AccountDescription & "):F#" & row("Flow") & ":U7#" & account.Member.Name &",") 'ResultString.Append("A#" & row("Account") & ":Name( "& space & " " & AccountDescription & "):F#" & row("Flow") & ":U7#" & row("UD7") &",") ResultString.Append("A#" & row("Account") & ":Name( "& sign & space & AccountDescription & "):F#" & row("Flow") & ":U7#" & row("UD7") &",") Next ResultString.Append("A#" & account.Member.Name & ":Name( " & space & account.Member.Name & space & UD7Desc & "):F#None:U7#MT_RETTFT:U8#None" &",") 'ResultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None:U7#MT_RETTFT:Name(" & UD7Desc & "),") End If Next Return resultString.ToString Catch ex As Exception Throw ErrorHandler.LogWrite(si, New XFException(si, ex)) End Try End FunctionSolved108Views0likes4CommentsWhile consolidating on Top level getting error in Stored Calc
HI Team, We have created a stored calc and it is working fine at Base and parent entity level, but when we are running at Top entity level and my Time is 2028, at this i am getting below error. could not able to figure it. Can you please help us resolve the issue.39Views0likes2CommentsTransformation Rule - Split - Complex Expression
I need to get, from a Custom Dimension, the characters starting after "D." or "T." when it's possible. Normally it comes as D. or T. at the beginning, followed by XYZ. What I want to get, as a direct mapping, is XYZ (these are the members created in the Custom Dimension in OneStream). What type of mapping can I use for this? I don’t want to trim the source member in the Data Source because I need the full original source member to appear in Stage.Solved63Views0likes3CommentsRetrieve the culture in a BR and display the name & description of this culture
Hello everyone, We currently have a business rule that allows us to display a certain number of accounts for our cash flow cube view. The problem is that when returning account.Member.NameAndDescription, it does not take into account the user's culture. resultString.Append("A#" & account.Member.Name & ":Name(" & space & account.Member.NameAndDescription & "):F#None,") So I think I need to retrieve the culture of the user displaying the cube view in my BR in order to return the correct name and description. However, I don't know how to retrieve the user's culture, nor what parameter to return instead of account.Member.NameAndDescription to get the one in US English, as the default is in French. Do you have any ideas?27Views0likes1CommentDynamic calc
Dynamic calc formula for an account Dim RATE As DataCell = api.Data.GetDataCell("A#RATE:F#99:U7#Top") Dim CALC As DataCell = api.Data.GetDataCell("A#CALC:F#F99:U7#Top") If api.Pov.Entity.Name <> "None" And api.Entity.HasChildren() Then If RATE.CellAmount < 0.15 api.Data.Calculate("RATE = 0.15 * RemoveZeros(CALC)") Return RATE Else Return 0 End If End If i'm calling A#RATE from the cube view. i have error unable to execute the formula for member RATE, error in processing script. when i compile the formula no issueSolved35Views0likes1CommentMore Filters in FdxExecuteDataUnit
Hello, I'm building Dashboard Data Set business rule to retrieve data from cubes. Besides the member filters in FdxExecuteDataUnit parameters, I'd like to add some additional filters, like account dimension filters, UD1,/UD2/UD4 dimension filters. And filters could include plenty of values. How can I make it work? I try to defined it in below manner, but the result is not filtered as expected. Dim additionalFilter As String = "Account = 'EBIT' OR ACCOUNT = 'CAPEX'" 'Execute FDX query dt = BRApi.Import.Data.FdxExecuteDataUnit( si, "Total_Magna", ' Cube name "E#Parent1,E#Parent2", "C#USD", ScenarioTypeId.Actual, "S#Actual", "T#2025M1", "V#Periodic", True, additionalFilter, 100000, False )Solved75Views0likes9CommentsCreate 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?61Views0likes3Comments