# Fill(none) in flux to remove lines with null values

**URL:** <https://community.influxdata.com/t/fill-none-in-flux-to-remove-lines-with-null-values/20615>\
**Category:** InfluxDB 2\
**Tags:** flux\
**Created:** [July 3, 2021, 8:58pm UTC](https://community.influxdata.com/t/fill-none-in-flux-to-remove-lines-with-null-values/20615 "2021-07-03T20:58:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![danbars](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@danbars](https://community.influxdata.com/u/danbars)\
**Post date:** [July 3, 2021, 8:58pm UTC](https://community.influxdata.com/t/fill-none-in-flux-to-remove-lines-with-null-values/20615/1 "2021-07-03T20:58:40Z")

</div>

Hello,

It is mentioned [here](https://www.influxdata.com/blog/tldr-influxdb-tech-tips-february-16-2017/) that `fill` can take `none` as a parameter and then it **removes** lines that have null value.  
I couldn’t find this [documented](https://docs.influxdata.com/influxdb/v2.0/query-data/flux/fill/) nor could I make it work - tried multiple variations.  
Does this work in flux with 2.0? If it does, what is the syntax?  
Thanks

---

<div class="post-metadata">

**Author:** ![danbars](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@danbars](https://community.influxdata.com/u/danbars)\
**Post date:** [July 8, 2021, 3:45pm UTC](https://community.influxdata.com/t/fill-none-in-flux-to-remove-lines-with-null-values/20615/2 "2021-07-08T15:45:26Z")

</div>

🦗  
Anyone knows how to remove empty lines? 🥺

---

<div class="post-metadata">

**Author:** ![Anaisdg](https://sea1.discourse-cdn.com/flex023/user_avatar/community.influxdata.com/anaisdg/32/6401_2.png) [@Anaisdg](https://community.influxdata.com/u/Anaisdg)\
**Post date:** [July 8, 2021, 8:46pm UTC](https://community.influxdata.com/t/fill-none-in-flux-to-remove-lines-with-null-values/20615/3 "2021-07-08T20:46:52Z")

</div>

Hello @danbars,  
Welcome!  
Yes you can filter out null values with flux with `exists`

> **[filter() function | Flux 0.x Documentation](https://docs.influxdata.com/flux/v0.x/stdlib/universe/filter/)**
>
> filter() filters data based on conditions defined in a predicate function (fn).

I’m not sure why that’s not working for you. I would need to see some sample data as well as your query.  
Also, may I ask why are you using 1.x instead of 2.x if you’re new to InfluxDB?

---

<div class="post-metadata">

**Author:** ![danbars](https://avatars.discourse-cdn.com/v4/letter/d/2acd7d/32.png) [@danbars](https://community.influxdata.com/u/danbars)\
**Post date:** [July 8, 2021, 10:42pm UTC](https://community.influxdata.com/t/fill-none-in-flux-to-remove-lines-with-null-values/20615/4 "2021-07-08T22:42:25Z")

</div>

Thanks, @Anaisdg  
I am using 2.x. I just couldn’t find the relevant docs in 2.0 so I referred to 1.x.  
I’ll try what you suggested, thanks!
