Comparing rows in Data Studio
Welcome to the site! I think that you should be asking yourself "why" you can't do this in Data Studio. The likely answer is that Data Studio is a visualization tool while you are looking to do a transform of your existing data.

Most visualization tools are really only good at handling data in it's final form. It sounds like you still need to work on the data a little more to get to that stage. You should consider doing some SQL and/or scripting work (python, R, Julia, whatever) on your data to get it ready in the right format prior to importing it into Data Studio. Good luck!