06-11-2024 12:02 PM
Hello every expert:
I am not able to reference a different scenario member in custom calculation business rule. I tried the following
api.Data.Calculate("S#Forecast=S#Actual","A#10100" ...........)
in the finance business rule I created. When I run the rule through Data Management Step, I have to specify Scenario and I select Forecast, I got error S#Actual is not valid dimension member when I run the business rule through custom calculate step. I really appreciate any helps from you. Thanks in advance.
Solved! Go to Solution.
06-11-2024 02:47 PM
Have a look at the properties of your Cube (in the Cubes page). Chances are that the dimensions for one scenario type are different from the dimensions in the other.
OneStream allows you to use different metadata hierarchies for any Cube/Scenario combination, but the dimensions not specified in the formula (in your case, all of them except Scenarios) must match in order to move data through buffers like you're trying to do. Think about it: if you retrieve a bunch of cells that point to account A, B, and C, and then try to copy them into a place where such accounts don't exist in the hierarchy, what is the product supposed to do? 😊
(In theory you can use a few mapping functions like ConvertDataBufferExtendedMembers, but they are a bit advanced and you'll have to understand where they can actually work - leave them alone for now).
I would recommend:
That should do it. Btw, I would recommend you go through the OneStream Financial Calculations Handbook, it's a great resource and easier to digest than the standard documentation.
06-11-2024 12:20 PM
HI @SimpleLove ,
Could you share the Business rule? I assume that the Scenario Actual exist with this name within the Scenario Dimension?
Also, the screenshot you sent is missing the Cube Definition, and pulling the Entity, and Time from the Application POV. Is that correct? I suggest you start with a pre-defined/hardcoded POV (Cube, Entity and Time) to troubleshoot.
Hope that helps,
Albert
06-11-2024 01:46 PM
Hello Albert: Thank you for the help. I found that my Actual and Forecast scenario need to be same Scenario type. If they are not the same I cannot do the following calculation in the business rule
api.Data.Calculate("S#Forecast=S#Actual")
I did set up all the member in the custom calculation.
Below is my Scenario dimension, If both Actual and Forecast members have Scenario Type=Actual, I can do the calculation. If Forecast members have Scenario Type=Forecast and Actual members have Scenario Type=Actual, the calculation does not take place.
06-11-2024 02:47 PM
Have a look at the properties of your Cube (in the Cubes page). Chances are that the dimensions for one scenario type are different from the dimensions in the other.
OneStream allows you to use different metadata hierarchies for any Cube/Scenario combination, but the dimensions not specified in the formula (in your case, all of them except Scenarios) must match in order to move data through buffers like you're trying to do. Think about it: if you retrieve a bunch of cells that point to account A, B, and C, and then try to copy them into a place where such accounts don't exist in the hierarchy, what is the product supposed to do? 😊
(In theory you can use a few mapping functions like ConvertDataBufferExtendedMembers, but they are a bit advanced and you'll have to understand where they can actually work - leave them alone for now).
I would recommend:
That should do it. Btw, I would recommend you go through the OneStream Financial Calculations Handbook, it's a great resource and easier to digest than the standard documentation.
06-11-2024 04:16 PM
@JackLacava Your advice is really helpful. Thanks a lot.