I have been trying variations on this for longer than I care to admit
This formula calculates working days (taken from elsewhere on this site and altered for my fieldnames)
(DateDiff(DateInterval.day,ReportItems!ME06Test.Value,Fields!DATE_VALUE.Value)+1)
-
(DateDiff(DateInterval.WeekOfYear,ReportItems!ME06Test.Value,Fields!DATE_VALUE.Value)*2)
-
IIF(Weekday(ReportItems!ME06Test.Value,1) = 1,1,0)
-
IIF(Weekday(ReportItems!ME06Test.Value,1) = 7,1,0)
-
IIF(Weekday(Fields!DATE_VALUE.Value,1) = 1,1,0)
-
IIF(Weekday(Fields!DATE_VALUE.Value,1) = 7,1,0)
And it works great unless the field in the matrix is empty:
This:
= IIF( (IsDate(ReportItems!ME06Test.Value)) and (IsDate(Fields!DATE_VALUE.Value)), "YES" , "" )
populates the matrix correctly with blanks when there is a missing date and a "YES" when both date are there.
Now my issue is that if I replace the "YES" with the formula to calculate working days above instead of the "YES" I get the formula result (excellent) but instead of the "" I get #error
Please can someone put me out of my misery and tell me why!!!!?????