if sum([# of things])=0 then "Error" else str(sum(([# of things]) end
I would guess you have an aggregation on # of things.With sum, I don't think you need NULL, but if you do:
if isnull(sum([# of things])) then "Error" else str(sum(([# of things]) end
Thanks for the reply Alex.
I do have an aggregation on # of things, so when it's typed as a string, it can't sum properly.
There's really no setting to rollup as an error if a value in the set is null?
Did you try either of my calculations? One should work - you are not summing a string, you are making the summed value a string
You may need something like the following if you are looking for a calculation that rolls up to different levels of aggregation, but displays an error if any row-level values are NULL:
MIN( IF ISNULL([# of things]) THEN 0 ELSE 1 END ) == 0
THEN "Error" ELSE STR( SUM([# of things]) ) END
What this does is check to see if a NULL occurs for any values at a row level. If any of the values are NULL then the MIN will be 0 and the entire calc will return "Error". Otherwise, you'll get the sum of the field as a string.