What is Dimension Fill?
Dimension Fill is a feature that “fills in” values of a dimension for which there are no corresponding measure results. This way, you see all of the dimension values, regardless of how the data is filtered.
Example
Without Dimension Fill
Without dimension fill, when we have a sparse data set with some weeks missing, it looks like the image below:
In a line chart, the missing weeks are simply omitted from the chart, giving the illusion of a continuous line:
With Dimension Fill
With dimension fill turned on, the weeks without data are included with a null value. This makes it more clear that nothing happened in between the weeks with data:
How do I use Dimension Fill?
Dimension fill only works on enumerations—dimensions which Looker could know all possible values for—and ranges. These includes the types yesno
, tier
, date
, and case
. Dimension fill does not work on type string
or number
at this time, though the case
type is often used as a workaround for these types.
Dimension Fill will turn on automatically for queries that run with a single dimension and/or a single pivot. These are the only cases in which Dimension Fill can be used. You can tell that Dimension Fill is on by looking for this symbol:
How do I turn off Dimension Fill?
There are two ways to turn off Dimension Fill:
Disabling Dimension Fill at the Explore Level
To turn off dimension fill while viewing an Explore, click the gear next to the dimension in the Data table and then click “Remove Filled in Values.”
Disabling Dimension Fill at the LookML Level
To prevent Dimension Fill from ever turning on for a given dimension, you can add allow_fill: no
to the LookML definition of that dimension.