I've been struggling with a Microsoft Project (2013 Standard) formula assigned to a number user-defined field to calculate the difference between tasks' current Finishes and a baseline Finish I've previously set.
Switch( [Finish]="",0, [Baseline1 Finish]="",0, [Finish]=projdatevalue('NA'),0, [Baseline1 Finish]=projdatevalue('NA'),0, [Finish]-[Baseline1 Finish]<=0,0, [Finish]-[Baseline1 Finish]>0,[Finish]-[Baseline1 Finish] )
On tasks for which [Baseline1 Finish] is "NA" I consistently get a #ERROR, even though I should have trapped for it between lines 3 & 5 above. I've tried everything I can think of, such as:
- Using an equivalent IIF formula
- Using different user-defined date fields (e.g., [Baseline2 Finish])
- Removing different elements of the formula one at a time
- Checking against a "high" date value (e.g., 2^30, since this is how I understand Project actually renders "NA" behind the scenes) instead of using ProjDateValue (c.f. http://masamiki.com/project/customfieldFAQ.htm)
But no seeming change in behavior. Is there a defect in Project when using ProjDateValue in a formula against one of the user-defined date fields?