Bar Gauge drops bar when count = 0

Hi there,
I am using Grafana v7.1.1 to display user behaviour. It is connected to my MySQL database. I have a dashboard having one graph showing new users in the last 7 days, and one graph showing the total amount of users a company has. They are both Bar Gauge graphs using the ‘Count’ calculation.
However, if a company doesn’t have any new users in the last 7 days, instead of the bar showing ‘0’ (because the count query returns 0), it just does not display anything for that company. Example:

This is the configuration of my Bar Gauge:

I really want it to show ‘0’ for any company that did not have any new users. The count query does not return ‘null’, it returns ‘0’ as count, so I don’t understand why that is not displayed in the graph.

Can anyone help me with this? Thanks!

You have not shown your query so it’s a bit hard for me to advise, but I suspect it may be to do with how Grafana is handling a “Count” calculation and ignoring zeros. I do all my bar graphs with a “Total” calculation and then have a count in the SQL query, so something like a Time Series query of:

select now() as time,
??? as metric,
count(???) as value
from …
where …
group by metric

That helped, just using the “Total” instead of “Count”. Thanks!

mine not working even though i did Total