Circular Reference Issue in rank traversal

Options
srishtinahata
srishtinahata Member, ALL USERS Posts: 4 New Contributor

I have a problem statement where I am trying to do some allocation basis rank traversal

there is fixed quantity Q= 900 which i have to distribute amongst vendors .

 

e.g if i allocate 100 to V1 basis some logic, then I am calculating remaining quantity for allocation to other vendors V2 where I calculating remaining quantity = Q- cumulate of allocated till now. Here I am facing issue of circular reference. I need to stop traversing whenever remaining for allocation is zero or cumulate of allocated till now equals the fixed quantity Q which we had to distribute.

 

Many thanks for any suggestions that I may get

 

 

 

Comments

  • srishtinahata
    srishtinahata Member, ALL USERS Posts: 4 New Contributor

    Thank you for the prompt response

    requirement is as I traverse the vendors from V1 through V5, I will have remaining quantity calculated as per the allocation and total quantity

     

    Hence considering your example, V1 allocated 100 , remaining should be 900-100

    Similarly for V2 if allocated is 200, then remaining would be 900-100-200 and so on

     

    Please suggest if i could give clarity

     

  • srishtinahata
    srishtinahata Member, ALL USERS Posts: 4 New Contributor

    Hi Anirudh

    yes I have tried rankcumulate , however when I am calculating allocated from remaining quantity and remaining from total and allocated quantity is where I am facing circular reference issue

  • srishtinahata
    srishtinahata Member, ALL USERS Posts: 4 New Contributor

    @prabhu 

     

    When I am next trying to calculate allocated from remaining quantity, is when i am facing circular reference issue.

    Here I am trying to allocate remaining quantity to next vendor 

     

    srishtinahata_0-1595993013648.png