Forum Discussion
db_pdx
2 years agoValued Contributor
Hi raoulheinen:
I think you're close but need a few changes.
1) for your sourceBuffer you should include U1#Top in the member filter
2) you set/commit the buffer with api.Data.SetDataBuffer as the last step
3) you need some additional info in your destination info. Specifically, where top level members are going to fixed, base level members. In this case your U1#None
All together it would look something like (please double check for typos/accuracy):
Dim sourceBuffer as DataBuffer = api.Data.GetDataBufferUsingFormula("RemoveZeros(FilterMembers(Cb#cube1:S#ActualM:C#Local:O#Forms:U1#Top))")
Dim convertedBuffer As DataBuffer = api.Data.ConvertDataBufferExtendedMembers("cube2", "ActualM", sourceBuffer) 'note: you might need form 2 which uses entity in the function
Dim destInfo As ExpressionDestinationInfo = api.Data.GetExpressionDestinationInfo("O#Forms:U1#None") 'note: confirm you want it still in O#Forms vs O#Import
api.Data.SetDataBuffer(convertedBuffer, destInfo,,,,,,,,,,,,,True) 'note: storing as durable. Confirm this is your requirement. Also, you can do additional filtering here while setting as well.
Let me know if that works for you. Cheers, -db
Related Content
- 4 years ago
- 2 years ago
- 4 years ago
- 4 years ago
- 2 years ago