Circular Reference in Open Orders

Hi All, 

 

I am working on a stock rationalization logic where I have Orders as dimension and have to see how the SKUs will get distributed as per the requirements. Attached is a case representing the logic. 

 

For the first 3 days, the supply is pooled and then allocation happens for the SKU. However, for Day 4, the closing inventory after day 3 has to be used, causing the logic to break due to circular references. Note that while I have done random allocations, the logic uses the inventory left after each allocation to decide what is to be allocated next. 

 

Even if I use time as a dimension, I am not able to get the logic working straight because when I use Previous function, it looks at the previous date of the same order id. so for #87, it looks at 08/03/2021 of #87 whereas the actual data it needs to reference is in 08/03/2021 of #54. 

 

I think i have spent too long getting confused so thought I would open it to the wider group for some ideas. Thanks!

 

Best Answer

  • Misbah
    Answer ✓

    @ankit_cheeni 


    PREVIOUS doesn't work on NON Time dimension (although there was an idea to open this function for non time dimension as well but i highly doubt that it is coming because the way Anaplan is designed). Hence you will not be able to reference the data of any other non Time list member with this function.

     

    Next possible solution would be to create a mapping table and then use LOOKUP. For example #87 gets mapped to #54 and so on.

     

    Misbah

Answers

  • Hi Misbah,

    I was using Previous with time dimension present but another list being present, Previous would look at the previous time period within the same list item of the other list. I concur with your mapping table logic but I just took a design decision to bridge the logic using an import action to break the daisy chain. That has worked well.

    However this circular reference is a bit nasty and there are not a lot of ways to get yourself out of it. Thanks for your reply though. Always informative 🙂