I'm not sure what you're looking for, but I can give you some pointers.
As you found out, you need to come up with a calculation that duplicates what the reference line is doing, and then subtract from calculation. I'm not clear on why you were using WINDOW_AVG() in your version, that won't come up with the 350/400/450 totals you are using as the reference line.
I created a separate worksheet where I created a calc that generates the totals (TC Total Hours), then a second calc that subtracts the total hours from that total (Diff from Total), then put Diff from Total on the first graph as an example. The Compute Using for each is set to Work Type, so a new total will be geneerated for each Hours Type.
Let me know if this helps, or if you have further questions!
Thanks Jonathan. Appreciate the help. I needed to use WINDOW_SUM instead and I think I got confused by an example I was using that also referenced FIRST() and LAST() in the table calc.