You're getting this error because of the ending portion of your IF() function. The error message in this case is very helpful:
The value for column 'AssignmentBaselineWork' in table 'AssignmentBaselines' cannot be determined in
the current context.
when the formula for a measure refers directly to a column without performing any aggregation--such as
sum, average, or count--on that column. The column does not have a single value; it has many values, one for each row of the table, and no row has been specified.
One of these two sections is the cause of your problem.
In the first case, you either do not have relationships appropriately defined between the tables and the Power Pivot engine cannot figure out which value you want.
In the second case, there are multiple possible values of 'AssignmentBaselines'[AssignmentBaselineWork] and you need to wrap that reference in an aggregation function.
If you could provide us a data sample including an example of expected results, that would be most helpful.