Single Value Visualization - Showing 'No Results' as '0'?

done
low_priority
reply

(Matt) #1

I’m a big fan of the single value visualization, which we use to report daily performance (ex: # of customer complaints). In cases where there are no results for a given date, the visualization shows the text “No Results”. I would like it to display the number “0” instead because the actual result is zero (e.g., 0 complaints).

Is this possible?


(samaneh fathieh) #2

I have the same request, please. Is there any way to show ‘0’ instead of ‘No Results’?


(Izzy) #3

If the query really isn’t returning any results, there isn’t a way to get it to show anything other than “No Results”.

That said, there’s a really easy way around that, which is to get the query to show results :slightly_smiling_face:.

You could do this by just adding a measure, of type: count. Even though this query has no results:

meaning there’s absolutely NOTHING happening that day, querying for my count: measure with the same filter returns a nice golden goose egg:

If you add the ID dimension back in, though, it’ll have nothing to group by, and will again return all results. You can only have measures or date fields (which will automatically fill in even if the data isn’t present in the database) in order for this to work. See examples below:

Works


Doesn’t work, since I added another dimension that isn’t a date/time.

See if you can’t remove some dimensions or add some measures to cleverly get what you want! If you’re stuck, maybe post some screenshots (without company info, shouldn’t be too hard if there are No Results :wink:) and we can take a look.


(Nicholas Wong) #4

Hey Matt! I am a big fan for single visualization too! It is great for showing important statistics like revenue generated for that week, etc.

Like what izzy said, just introduce a measure with your date as the filter, you will get the number “0” when there is no results.