How to get a first value of line item




I have requirement where I need to identify the first value of Borrowing line item and that value would flow into initial commitment. So I have used ISFIRSTOCCURENCE with a logic IF Borrowing <> 0 THEN ISFIRSTOCCURRENCE(Borrowing, Revolver Facility) ELSE FALSE but this will giving me two occurrence. 


what I need is the first value of Borrowing into the initial commitment for ex: 3/2/2022 value of Borrowing(700) into initial commitment only that value

The list which I have used is custom dates list which I have created.






Riyaz Pasha

Best Answer

  • anikdas
    Answer ✓
    Can you do a cumulate over your custom date list and then compare the cumulate against the original line item? It should only be true for the first value of the item.

    Alternative, instead of comparing the borrowing line item, convert the line item into another line item which will indicate value of 1 if borrowing is not zero. Then you can do the similar first occurrence on the derived line item.


  • Hi @anikdas ,


    I will go with the second option as it would not give performance issues in future. 


    Thanks for your help




    Riyaz Pasha