...
Code Block |
---|
stateAverage = [Overall Average: Utah Students: Essay Score]; reportAverage = [Average: Essay Score]; round(reportAverage - appwideAverage, 2) |
Some of your data may contain missing values. If so, there is an isNull() function that can be used to change the outcome of the expression based on the presence of a missing value. The following example generates a text results based on the Age field but does not handle missing values:
Code Block |
---|
if (
[Age] > 50,
"Over the Hill",
"Under the Hill"
) |
But if any records were missing a value for Age, then the expression would throw an error. The following improvement handles missing values:
Code Block |
---|
if (
isNull([Age]),
"Don't Know",
if (
[Age] > 50,
"Over the Hill",
"Under the Hill"
)
) |