I think the error is in cell C24 in which you reference $apellido and $nombre.
Because they are variables included in a repeat group, you should specify which iteration the app should consider. I suggest you create a separate calculate variable in the previous row obtaining the relevant values and then reference these in the cell C24.
I hope this helps!
Best,
Andrea