Hi,
I tested this in my environment.
When using a synthetic record like this:
data record(a=0)
| summarize value = count()
| append [ data record(value = 0) ]
| summarize value = max(value)
the result is 1, because count() counts the row that was artificially created by data record(a=0). So this is expected DQL behavior.
With sum(a), the resulting value is 0, but the Single value tile still shows No data available.
So the issue does not seem to be coalesce() itself, but rather how the Single value visualization handles summarized results based on synthetic records.
What worked for me was using the same fallback pattern on real queried data, for example:
fetch dt.davis.problems
| filter event.status == "ACTIVE"
| summarize value = count()
| append [ data record(value = 0) ]
| summarize value = max(value)
This worked correctly in my tests. When matching problems existed, the tile showed the real count
when nothing matched, the tile showed 0 instead of No data available
I also tested it with different filters, and the Single value changed accordingly (0, 1, 32, etc.), so this workaround seems reliable when used on actual fetched data rather than only on synthetic data record(…) input.
Look, depending on which filter I used for event status, the Single value changed accordingly — 0, 1, 32, etc.