Question

Display all results even if value is null

  • 26 December 2022
  • 1 reply
  • 13 views

Hi,

I’m using visualization and I have an issue with some products which are hidden some days because there were no sales.
As example, I’m selling 10 products, if one day only 5 of them have been sold, visualization is hidden the 5 remaining products.
How can I always display all products in visualization table even if there was no sales?

Currently, the only situation when all products are displayed is that when all of them had at least one sale.

I’m using sum_price and count products as measures.

Many thanks for your help?


1 reply

You can include more data than needed for the visualization and limit displayed rows in the visualization options.  If you want 0s for null values in the visualization you can have a table calculation of if(is_null(your_metric)=yes,0,your_metric).

Looker does not know a value for a dimension exists if it sees no values of it in the query,

Reply