I am struggling to get a simple yield measure to work in my data model. Despite the SQL being accepted as valid, I get this error one I try to preview the calculation in the data model preview.

Assuming I am missing something about how these tables need to be joined to make the calc work, I am trying from the front end view to add a calculated column, and it works as I would have hoped until I add groups. Then the calculated column only shows results at the group level and leaves the content blank.

Is there some other way to accomplish my goal of dividing the consumed qty of material on a work order by the produced qty in order to get a yield?

Thanks for your help on this.