Query returns cause field to error

I have the following query

SELECT Sum(Dessert_Auction.Cash) AS SumOfCash, Status
FROM dessert_auction
WHERE EventName = ‘{Auction_System/Event_Name}’
AND Year = {Auction_System/Event_Year}
AND Status = 1

With the fallback value enabled and set to “0”. My text field ‘NaN’ if the query returns with no values.

How can I display a test or number that I want?

Try using COALESCE

SELECT COALESCE(Sum(Dessert_Auction.Cash),0) AS SumOfCash, Status FROM dessert_auction WHERE EventName = '{Auction_System/Event_Name}' AND Year = {Auction_System/Event_Year} AND Status = 1

Thanks,

I had tried that but had my syntax wrong, works great now. :smiley: