If identification can only appear twice and only one of them has the value filled in, you can use any of col statistical functions such as col min()
Col Min(:ref1, :id) / Col Min(:ref2, :id)

There are also plenty of other options which might slightly depend on the full data you have.
-Jarmo