Counter Visualization: count rows never shows zero
See original GitHub issueIssue Summary
If I toggle Count Rows and my query returns no results, the visualization disappears. It should show “0”. It makes sense for the visualization to disappear if it points at a field and row index. But sometimes the number of rows is actually zero and this should be reflected by the counter.
Steps to Reproduce
- Write a query that returns a single row:
SELECT 'foo', 'bar'
- Add a counter visualization and toggle Count Rows. The counter will show 1.
- Add a NULL
WHERE
clause to the query …where 1 =2
. The counter disappears.
Technical details:
- Redash Version: 7, 8, 9alpha
- Browser/OS: Firefox / Chrome / Safari
- How did you install Redash: Saas / Docker
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Desire to display 0's for "Count of" in table | Power BI Exchange
It shows the number of childred for each parent when the count is greater than zero but I would like to display the...
Read more >How to get a simple count of rows in a table - Qlik Community
I'm trying to find a simple way to make my table title show the number of rows in the current selection. Usually I...
Read more >Visual To Display Data Counts When Count Is 0
Hello! I am working on a report that displays sales rep activities for the current week. The report is being displayed on a...
Read more >How can I count the numbers of rows that a MySQL query ...
Getting total rows in a query result... You could just iterate the result and count them. You don't say what language or client...
Read more >Python's Counter: The Pythonic Way to Count Objects
Then you increment the counter to reflect the number of times a given object appears in the input data source. When you're counting...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you for taking a look at this.
You need to create a fork on GitHub, push to your fork and make a pull request from there.
On Fri, Nov 22, 2019, 01:45 dmudro notifications@github.com wrote:
Hi @dmudro thanks for pointing that out, there is #4366 to allow more aggregate functions in the Counter visualization, so the “Count rows” will probably be merged into a “Counter Type” dropdown soon. Regarding the inconvenient non existent value, that seems a bug, I’ll investigate further on that as it should either show a placeholder or select a valid column value by default.