GetData() and GetDataN() must be defined with one of the statistical functions, either Min, Max, or Avg. The Platform cannot run these data functions unless they are "nested" or bounded by a statistical function.
The following expression retrieves all values for temperature that were logged to the Platform for the past week, and determines if the average was less than 0.
If: avg(GetData("DataItem.Temp.value", 1w)< 0