This feels like a very basic question, but I\'ve been struggling with it. Simplified version follows. I have the following dataset: