I added some screenshots how I'd do this. But it would have to be interpreted based on your wanted outcome.
For example: I created the variance to the maximum fee obtained by changing the summary settings. => if you would like to do this you probably want to create a separate line item in order to keep the sum.
I also added the "Mother" as a separate line item, although in a real model it would be best practice to do this via a system module.
But the core mechanics would remain the same, so just finetune as as required 😉
This is the typical use case of Previous and Next functions for non time dimensions. There is an idea shared already which will extend these functions to lists as well - let's see if we get this near soon.
On your query I think @nathan_rudman is right. You need to map it and then use Lookups based on the mapping. That's the only way you can get immediate next or prior values based on the mapping