I am trying to sum a total where the year is less than the max year.
=Sum(iif(Fields!YEAR.value < max(Fields!YEAR.value), Fields!Year_Sold.Value,0)) it runs but i am getting #ERROR is my syntax correct?
Try adding the dataset for the MAX - aggregate functions require the dataset so they get the max over the whole dataset and not the one record.
=Sum(IIF(Fields!YEAR.value < MAX(Fields!YEAR.value, "Dataset1"), Fields!Year_Sold.Value, 0))