Fill forward: Possible?


(Dennis Tai) #1

I understand there’s currently a fill missing date feature. It fills in the date but not the value. I’m wondering how I can implement some sort of fill forward on the value side?


(jeremy.eckman) #2

Hey @Dennis_Tai - this is our documentation on the ‘Fill Missing Dates’ feature (link) which describes using this feature. Essentially, this feature “fills-in” dates when there is no values associated with them, so it’s expected that the counts will be null- the docs above will show examples of this- because there isn’t data for those dates.

If it is desired to fill a particular value or label for when that column is returning a null value, we could apply a table calculation to substitute the null. A common example of this is showing 0 instead of the null symbol, which can be achieved with a table calculation like this:

if(is_null(${view.count_field}), 0, ${view.count_field})

Where ${view.count_field} is the field you’d like the nulls filled in for. Give the table calculation an appropriate title and the correct formatting and click save. You can then use the ‘Hide from Visualization’ option on the original field, and this new table calc will essentially take its place.


(lloyd tabb) #3

What Jeremy said is exactly correct. An easier to write this is with the coalesce function. coalese picks the first non-null value so the formula can be written a little more simply.

coalesce(${view.count_field}, 0)

(Dennis Tai) #4

Thanks! I’m also looking into a version of this where the fill forward is carried over a certain partitioning (e.g. rate data by country) but looks like would be possible as well. I’m gonna try a bit.