Roll Scenarios for prior 5 periods by renaming scenarios via Business Rule

RandyThompson
New Contributor III

Has anyone tried to rename scenarios using a business rule to have a rolling set of prior forecasts. In this case the client is to trying to have weekly scenarios for the prior 5 weeks. Once a week they will be importing into the current working scenario and rolling each prior scenario back one week.

I tried using the code below but get the error "Error processing Data Management Step 'Roll_CAR_Weekly_Scenarios'. Unable to execute Business Rule 'Roll_CAR_Weekly_Scenarios'. Error renaming member 'CAR_PrWk5_MTD'. Invalid parameter 'CAR_PrWk5_MTD'."

RandyThompson_0-1687789772261.png

Thanks.

 

3 REPLIES 3

RobbSalzmann
Valued Contributor

Hi @RandyThompson , renaming members has far reaching implications.  Business Rules, Member Formulas, Dynamic Calcs, Cube Views, Confirmation Rules, Dashboard Parameters, Metadata text properties are among the many places that member may be referenced.  

Consider instead copying the data into the appropriate scenarios each week instead of renaming them.  Something like:

Clear CAR_PrioWk5_MTD
Copy CAR_PrioWk4_MTD into CAR_PrioWk5_MTD
Clear CAR_PrioWk4_MTD
Copy CAR_PrioWk3_MTD into CAR_PrioWk4_MTD
Clear CAR_PrioWk3_MTD
Copy CAR_PrioWk2_MTD into CAR_PrioWk3_MTD
Clear CAR_PrioWk2_MTD
Copy CAR_PrioWk1_MTD into CAR_PrioWk2_MTD
Clear CAR_PrioWk1_MTD
Copy Car_Current_MTD into CAR_PrioWk1_MTD
Clear Car_Current_MTD 
Load Car_Current_MTD from source

 

 

Taking into consideration the fact that he would end up with a set of scenarios with the same names as he started with, I feel like most of these situations might not be an issue. Can you think of any of them that would still be an issue in this case? E.g. perhaps one of those are storing a member id rather than member name? Off the top of my head it feels OK but you never know until you've tried (broke) it and I haven't myself!

RandyThompson
New Contributor III

Hi Robb,

Yes this was my backup plan. I was just hoping that renaming scenarios, if that was possible, would perform faster and use less resources than copying data 5 times. Thanks.