1

I have a Looker visualization that shows 'No Results'. It's a count of measure with date. I need to show the visualization with dates even if there are 'No Results' (as a visualization missing the line since we dont have data, but dates still visible).

Is there a way we can do that in Looker?

Aqib Shah
  • 11
  • 1

2 Answers2

0

Naturally, Looker returns the rows of data in your model that match you filtered criteria. No rows, will result in no data shown as you are experiencing.

Depending on your data, providing you can write SQL to produce the result you want (try starting with a full date table list and left joining / counting your measure from there) then you could use a derived table to meet your specific need. Derived tables should be used sparingly, as they negative the benefits of modelling in LookML, but if its for a single / small number of visuals, they can be structured to achieve your required output

Daryl Wenman-Bateson
  • 3,870
  • 1
  • 20
  • 37
0

Try outer joining your final dataset with the dimension table containing just a list of dates (in some databases, you may have pre-created one or you can generate it relatively easily). In case you have no data in your main table, you will get a list of dates as the result of the query, which will be shown on the viz. Keep in mind, though, that if your viz is based on a pivot dataset, this approach won't work in Looker as it forcefully eliminates all the records containing NULLs.

IGOR
  • 1
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Feb 25 '23 at 23:05