Refering to data in previous item of a list

Highlighted
Previous Contributor

Refering to data in previous item of a list

I have pulled a list in a module and this list contains data for various events. Now I want that the calculation on any event in the list to act on the data on the previous list. Example: I have 3 line items in my module, namely the principal amount, increase rate (different for different time periods and events) and a final value. A list named Events has been pulled as a dimension in this module. Now I want that the first item in Events takes principal and rate values from another module and calculates the final value. The second item of the list to take this final value as its principal input and using rate calculate a final value; which will be used as the principal for third item in the list.... and so on. How can we achive this?

13 REPLIES 13
Highlighted
Occasional Contributor

RE: Refering to data in previous item of a list

have you tried creating a property in the list which contains the previous item. You would have to manually create that, but that should be as simple as a one-off cut and paste. Then you can use that as a lookup to get to previous data. I have not modelled this, but cannot see why the approach wouldn't work.
Highlighted
Previous Contributor

RE: Refering to data in previous item of a list

Yes I had tried that, but it leads to a circular referencing when I try refering to values using Lookup.
Highlighted
Occasional Contributor

Re: RE: Refering to data in previous item of a list

I have a similar problem, and I'm very keen to know how to solve the circular problem....

Highlighted
Previous Contributor

RE: Refering to data in previous item of a list

HI Peeush, I can help you if you can share a screenshot of your bluepring view. That can ideally help us to get to find where the issue is. Ideally, the solution suggested earlier by Paul should not lead to circular reference. Regards Hari
Highlighted
Previous Contributor

RE: Refering to data in previous item of a list

Sorry for late reply. But will this attached snapshot work? (I have simplified the module to the bare minimum references outside this module.) I want to add the formula in "Sales After Event" as "Sales After Event [ lookup: Previous Event] + To be Added"...... but this gives as a circular reference error. Please suggest a solution.
Highlighted
Previous Contributor

RE: Refering to data in previous item of a list

[quote]Peeush GoelSorry for late reply. But will this attached snapshot work? (I have simplified the module to the bare minimum references outside this module.) I want to add the formula in "Sales After Event" as "Sales After Event [ lookup: Previous Event] + To be Added"...... but this gives as a circular reference error. Please suggest a solution.[/quote] HI Peeyush, Did you try using CUMULATE formula?
Highlighted
Previous Contributor

RE: Refering to data in previous item of a list

Yes, I did that as well. It did not work. Apparantly the cumulate can only act if we store the result in some other third line item. Not in the same circle of reference.
Highlighted
Super Contributor

RE: Refering to data in previous item of a list

Hi Peeush Since all the values are interlinked its really tough to do it without a circular reference. The way i can think of is: Keep a drop down line item which says which value is result, then have  drop down with what is to be caculated then write if conditions for all the three line items, and all the three line items should have option of manual value and calculated value (either of this value will move to final value based on selection parameters again). Its big long procedure but this will surely work without any circular references.
Highlighted
Previous Contributor

RE: Refering to data in previous item of a list

[quote]Harish B KHi Peeush Since all the values are interlinked its really tough to do it without a circular reference. The way i can think of is: Keep a drop down line item which says which value is result, then have  drop down with what is to be caculated then write if conditions for all the three line items, and all the three line items should have option of manual value and calculated value (either of this value will move to final value based on selection parameters again). Its big long procedure but this will surely work without any circular references. [/quote]Sorry Harish, but I did not get that procedure. Also AFAIK, the line item can only have either a calculated value or a manual value (after enterring an IF the value turns calculated). Please clarify! Thanking You, Peeush