# How do I return values which have returned 1?

**URL:** <https://community.dynatrace.com/t/how-do-i-return-values-which-have-returned-1/54693>\
**Category:** DQL\
**Tags:** dql, grail, dashboards\
**Created:** [January 21, 2026, 12:31pm UTC](https://community.dynatrace.com/t/how-do-i-return-values-which-have-returned-1/54693 "2026-01-21T12:31:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![badgerfifteen](https://avatars.discourse-cdn.com/v4/letter/b/e68b1a/32.png) [@badgerfifteen](https://community.dynatrace.com/u/badgerfifteen)\
**Post date:** [January 21, 2026, 12:31pm UTC](https://community.dynatrace.com/t/how-do-i-return-values-which-have-returned-1/54693/1 "2026-01-21T12:31:43Z")

</div>

I have the following DQL code below:

```markup
timeseries interval: 10m, file_count = avg(filesystem.file_count, filter: { ( in(`dt.entity.filesystem:path`, classicEntitySelector("type(filesystem:path),entityName.equals(\"/link/link1/link2/test.csv\")"))) OR ( in(`dt.entity.filesystem:path`, classicEntitySelector("type(filesystem:path),entityName.equals(\"/link3/link4/test.1\")"))) }), by: { `dt.entity.filesystem:path` }
| fieldsAdd entityName(`dt.entity.filesystem:path`)
| sort arrayAvg(file_count) desc
| filter arrayIndexOf(array(file_count), 1)

```

When using the line chart for the last 24 hours, this will display a line chart where it is mostly 0 and then around 18:00, jump up as the value has changed to 1 until 19:00.

I’ve tried using arrayIndexOf to filter to just 1, but it doesn’t appear to work. Any ideas? How do I filter values or set a threshold to values which only appear as 1?

---

<div class="post-metadata">

**Author:** ![t\_pawlak](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/t_pawlak/32/14991_2.png) [@t\_pawlak](https://community.dynatrace.com/u/t_pawlak)\
**Post date:** [January 21, 2026, 1:18pm UTC](https://community.dynatrace.com/t/how-do-i-return-values-which-have-returned-1/54693/2 "2026-01-21T13:18:54Z")

</div>

Hi,

After timeseries, file\_count is an array (time series), not a single value.  
So arrayIndexOf() won’t work as expected.

Use iAny() to filter series that ever had value 1, and [] to work on points.  
try change filters To keep only series that ever reached 1:

```markup
| filter iAny(file_count[] == 1)

```

To display only points where the value is 1

```markup
| fieldsAdd file_count = if(file_count[] == 1, file_count[], else: null)

```

try this example:

```markup
| filter iAny(file_count[] >= 1)
| fieldsAdd file_count = if(file_count[] >= 1, file_count[], else: null)

```

it should keeps only series that hit the value 1
