Solved

Zero values in bar chart insights

  • 12 April 2021
  • 4 replies
  • 41 views

I have a bar chart that is using the basic “count of id attribute” for the measure. The problem that I have is that some of the “view by” values are missing from the chart if their count happens to be zero. I need to show all possible values of the “view by” column on the chart, even if their count is zero.

icon

Best answer by Joseph Heun 12 April 2021, 23:38

View original

4 replies

Userlevel 2

If you are unable to display values in your bar charts you may need to use an Ifnull statement in your metric. However, if you are still facing issues with your report, could you please open a ticket for our support team so they can look into the report/metrics themselves to further verify any possible workaround?

Could you share an example of ifnull usage in a count metric?

Userlevel 2

Something like this could work: 

 

SELECT IFNULL(COUNT(Records of Event,Records of Event) ,0)*1 

 

Sometimes there needs to be a little arithmetic trick at the end of the metric, so multiplying by 1 helps force the values. 

Thanks! Adding the following metric and using it instead of standard count caused the zero values to show up on the bar charts.

SELECT IFNULL(COUNT(Id),0)*1

Reply