Has anyone seeded or copied data from one scenario to another where dimensions were extended in one of the scenarios?

OSAdmin
Valued Contributor
Originally posted by Jon Golembiewski

7/19/2018

Has anyone seeded or copied data from one scenario to another where dimensions were extended in one of the scenarios? For example, Actuals accounts are extended from Forecast accounts i.e. Actual Accounts are at a detailed level and Forecast accounts are a summary level. So then in the copy rule you are copying a parent account into a base account.

2 REPLIES 2

OSAdmin
Valued Contributor
Originally posted by Eric Osmanski

For everyone following this, here is code to seed Actuals to FC when it is extended (FC at a higher level):
Dim ud2NoneID As Integer
If api.Pov.Cube.Name.XFEqualsIgnoreCase(""z_SuperCubeCOR"") Then
Dim destinationInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("""")
Dim sourceScript As String = ""Cb#z_SubCubeACOR:U2#Top""
Dim sourceDataBuffer As DataBuffer = api.Data.GetDataBuffer(DataApiScriptMethodType.Calculate, sourceScript, destinationInfo)
If Not sourceDataBuffer Is Nothing Then
Dim destDataBuffer As DataBuffer = api.Data.ConvertDataBufferExtendedMembers(""z_SubCubeACOR"", api.Pov.Scenario.Name, sourceDataBuffer)
Dim resultDataBuffer As New DataBuffer()
ud2NoneID = api.Members.GetMember(DimType.UD2.Id, ""None"").MemberId
For Each cell As DataBufferCell In destDataBuffer.DataBufferCells.Values
If (Not cell.CellStatus.IsNoData) Then
Cell.DataBufferCellPk.UD2Id = ud2NoneID
resultDataBuffer.SetCell(api.SI, cell, True)
End If
Next
api.Data.SetDataBuffer(resultDataBuffer, destinationInfo)
End If
End If


The dimensions are the same between the two scenarios except the Account dimension. Forecast accounts are at a higher level than Actual so that parent accounts in the Actual dimension are base in Forecast. Pretty standard. The data buffers get populated, but the converted data buffer still has the detailed accounts.
Can you change this Dim convertedDbf As DataBuffer = api.Data.ConvertDataBufferExtendedMembers(""CorpSGA"",scenario,sourceDbf)"" to Dim convertedDbf As DataBuffer = api.Data.ConvertDataBufferExtendedMembers(""CorpSGA"",""Actual"",sourceDbf)"

OSAdmin
Valued Contributor
Originally posted by Eric Osmanski

For everyone following this, here is code to seed Actuals to FC when it is extended (FC at a higher level):


Dim ud2NoneID As Integer
If api.Pov.Cube.Name.XFEqualsIgnoreCase(""z_SuperCubeCOR"") Then
Dim destinationInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("""")
Dim sourceScript As String = ""Cb#z_SubCubeACOR:U2#Top""
Dim sourceDataBuffer As DataBuffer = api.Data.GetDataBuffer(DataApiScriptMethodType.Calculate, sourceScript, destinationInfo)
If Not sourceDataBuffer Is Nothing Then
Dim destDataBuffer As DataBuffer = api.Data.ConvertDataBufferExtendedMembers(""z_SubCubeACOR"", api.Pov.Scenario.Name, sourceDataBuffer)
Dim resultDataBuffer As New DataBuffer()
ud2NoneID = api.Members.GetMember(DimType.UD2.Id, ""None"").MemberId
For Each cell As DataBufferCell In destDataBuffer.DataBufferCells.Values
If (Not cell.CellStatus.IsNoData) Then
Cell.DataBufferCellPk.UD2Id = ud2NoneID
resultDataBuffer.SetCell(api.SI, cell, True)
End If
Next
api.Data.SetDataBuffer(resultDataBuffer, destinationInfo)
End If
End If


The dimensions are the same between the two scenarios except the Account dimension. Forecast accounts are at a higher level than Actual so that parent accounts in the Actual dimension are base in Forecast. Pretty standard. The data buffers get populated, but the converted data buffer still has the detailed accounts.


Can you change this?

Dim convertedDbf As DataBuffer = api.Data.ConvertDataBufferExtendedMembers(""CorpSGA"",scenario,sourceDbf)"" to Dim convertedDbf As DataBuffer = api.Data.ConvertDataBufferExtendedMembers(""CorpSGA"",""Actual"",sourceDbf)"