What I really want is not the absolute power but the power ratio of two input signals which come from an AWG. I think I need to calculate (u1(t)/u2(t))^2, of course integrated over a long period. Is it possible at all?

Yes. Connect u1(t) to one channel and u2(t) to another. Then use a function to divide the two, another function to square the first function and a third to integrate the second function. This technique allows you to build complex equations.

Measuring power requires measuring both voltage