# Cannot filter by \_value in SNMP Tables data

**URL:** <https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025>\
**Category:** InfluxDB 2\
**Tags:** smnp, query\
**Created:** [February 25, 2022, 8:44pm UTC](https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025 "2022-02-25T20:44:29Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![R0bR](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@R0bR](https://community.influxdata.com/u/R0bR)\
**Post date:** [February 25, 2022, 8:44pm UTC](https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025/1 "2022-02-25T20:44:29Z")

</div>

I have snmp table data coming into a bucket and I am trying to filter by the \_value column but in doing so I always get “No Results” even though the data is there. I can filter by any other column like \_field or host that shows in the main results but never from \_value. I even tried to grab the main data set and push it into a new bucket and assigning the results of \_value to a new column of a different name and filtering on that column also gives “No Results”.

Can someone give some insights as to why data that I can see exists cannot be filtered like the other columns can?

---

<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:** [February 28, 2022, 8:59pm UTC](https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025/2 "2022-02-28T20:59:56Z")

</div>

Hello @R0bR,  
What is the query that you’re using?  
And what is the type of your \_value column?

---

<div class="post-metadata">

**Author:** ![R0bR](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@R0bR](https://community.influxdata.com/u/R0bR)\
**Post date:** [February 28, 2022, 10:19pm UTC](https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025/3 "2022-02-28T22:19:03Z")

</div>

Hello @Anaisdg ,

It’s a pretty basic query…

```auto
from(bucket: "InfluxDB_Server")
  |> range(start: v.timeRangeStart, stop: v.timeRangeStop)
  |> filter(fn: (r) => r["_measurement"] == "Volume")
  |> drop (columns: ["_start", "_stop", "_measurement", "host"])
  |> filter(fn:(r) => r.agent_host == "nas-01" and r._field == "volumeTableDescription")

```

This basically gives me a list of volume names that are mounted on the host nas-01 in the \_value column, but I don’t want all the volumes I want a specific volume by name but when I add…

```auto
|> filter(fn:(r) => r._value == "Volume_1")

```

It returns No Results even though the volume “Volume\_1” IS on the list of volumes returned.

This is the Raw Data showing in Influx, type is string.

 ![RAW_Data](https://us1.discourse-cdn.com/flex023/uploads/influxdata/original/2X/d/d485f7dc054cc5741222e2c325b14deb9e376e7d.jpeg)

---

<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:** [March 2, 2022, 4:50pm UTC](https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025/4 "2022-03-02T16:50:10Z")

</div>

Hello @R0bR,  
That looks like a bug to me.  
Can you please create an issue?

> **[GitHub - influxdata/flux: Flux is a lightweight scripting language for...](https://github.com/influxdata/flux)**
>
> Flux is a lightweight scripting language for querying databases (like InfluxDB) and working with data. It's part of InfluxDB 1.7 and 2.0, but can be run independently of those. - GitHub - influ...

Thanks!

---

<div class="post-metadata">

**Author:** ![R0bR](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@R0bR](https://community.influxdata.com/u/R0bR)\
**Post date:** [March 3, 2022, 7:28pm UTC](https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025/5 "2022-03-03T19:28:52Z")

</div>

Hi @Anaisdg,

I did last November with no response to it.

[Cannot filter by column when data is from snmp.tables · Issue #22941 · influxdata/influxdb (github.com)](https://github.com/influxdata/influxdb/issues/22941)

Going to add additional info like I posted here for more clarity.

---

<div class="post-metadata">

**Author:** ![R0bR](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@R0bR](https://community.influxdata.com/u/R0bR)\
**Post date:** [March 3, 2022, 7:39pm UTC](https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025/6 "2022-03-03T19:39:38Z")

</div>

I just realized your link goes to the Influxdata/Flux Github page, mine is just to Influxdata.

---

<div class="post-metadata">

**Author:** ![R0bR](https://avatars.discourse-cdn.com/v4/letter/r/aeb1de/32.png) [@R0bR](https://community.influxdata.com/u/R0bR)\
**Post date:** [March 8, 2022, 2:24pm UTC](https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025/7 "2022-03-08T14:24:24Z")

</div>

@Anaisdg , I figured it out. I had to filter with a string search to match the name of the volume I wanted to isolate.

```auto
|> filter(fn: (r) => (strings.containsStr(v: r["_value"], substr: "Volume_1")))

```

Now I have an issue where I have a Volume\_1 and Volume\_1\_1 in the mix but only want to filter Volume\_1. Because that exists as part of Volume\_1\_1 they both show. Is there a way to incorporate a NOT in the filter so match Volume\_1 but not Volume\_1\_1?

---

<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:** [March 8, 2022, 10:17pm UTC](https://community.influxdata.com/t/cannot-filter-by-value-in-snmp-tables-data/24025/8 "2022-03-08T22:17:10Z")

</div>

@R0bR Thanks for sharing your solution!!!
