Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In an expression, if you do a sum(X) a 0 value will be returned if data exists and the sum of X = 0 OR no data exists at all. I'm trying to determine if there is a way to add some logic in my expression so a 0 value will be returned if data exists and the sum of X = 0 and a NULL value will be returned if no data exists at all. This way I can use the isnull() function to display the zero but not show the null fields.
I hope that makes sense. Thanks for anything
Might be wrong but I don't think you can have sum(of something) return a null value. But you could also do a count so Count(of something) if something is null will get you a 0, if something is zero then you will get 1.
Then you can do something like if(count(something)=0, then do something because its null, sum(something)).
Might be wrong but I don't think you can have sum(of something) return a null value. But you could also do a count so Count(of something) if something is null will get you a 0, if something is zero then you will get 1.
Then you can do something like if(count(something)=0, then do something because its null, sum(something)).
Perfect Daniel thank you, the count() function works great. You are right the sum() always returns a zero while the count() will return a null!