# Filter Fields by Value Using DQL Queries for Precise Results

**URL:** <https://community.dynatrace.com/t/filter-fields-by-value-using-dql-queries-for-precise-results/48101>\
**Category:** DQL\
**Tags:** dql, notebooks\
**Created:** [October 2, 2024, 4:51pm UTC](https://community.dynatrace.com/t/filter-fields-by-value-using-dql-queries-for-precise-results/48101 "2024-10-02T16:51:31Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![JhonU](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@JhonU](https://community.dynatrace.com/u/JhonU)\
**Post date:** [October 2, 2024, 4:51pm UTC](https://community.dynatrace.com/t/filter-fields-by-value-using-dql-queries-for-precise-results/48101/1 "2024-10-02T16:51:31Z")

</div>

Hello everyone, could you help me because I am stuck, through a DQL query I get the following fields based on aggregations, the last thing I need is to be able to filter and only present the fields whose numeric value is greater than a threshold that I define. Example \>10, in the case of the image only one value will be presented. I appreciate the help.  
 ![dql.PNG](https://global.discourse-cdn.com/dynatrace/original/2X/8/891915b9706fe0b286946b70c21f15adaaa9e13a.png)

---

<div class="post-metadata">

**Author:** ![JhonU](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@JhonU](https://community.dynatrace.com/u/JhonU)\
**Post date:** [October 2, 2024, 4:51pm UTC](https://community.dynatrace.com/t/filter-fields-by-value-using-dql-queries-for-precise-results/48101/2 "2024-10-02T16:51:54Z")

</div>

![JhonU_0-1727890887311.png](https://global.discourse-cdn.com/dynatrace/original/2X/8/891915b9706fe0b286946b70c21f15adaaa9e13a.png)

---

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [October 2, 2024, 5:34pm UTC](https://community.dynatrace.com/t/filter-fields-by-value-using-dql-queries-for-precise-results/48101/3 "2024-10-02T17:34:25Z")

</div>

You can use the filterOut command after you do your aggregations to get rid of the records that are \< 10.

```markup
| summarize count = count(), by:{installerVersion}
| filterOut count < 10

```

---

<div class="post-metadata">

**Author:** ![JhonU](https://avatars.discourse-cdn.com/v4/letter/j/f14d63/32.png) [@JhonU](https://community.dynatrace.com/u/JhonU)\
**Post date:** [October 2, 2024, 5:44pm UTC](https://community.dynatrace.com/t/filter-fields-by-value-using-dql-queries-for-precise-results/48101/4 "2024-10-02T17:44:37Z")

</div>

I appreciate the response, however it seems to me that it does not satisfy the query, as seen in the image the final data is presented as fields with their respective value, of these I seek to present only those that meet the criteria, I have tried “fieldsremove” but I cannot add a condition to delete or not the field.

![JhonU_0-1727890887311.png](https://global.discourse-cdn.com/dynatrace/original/2X/8/891915b9706fe0b286946b70c21f15adaaa9e13a.png)

---

<div class="post-metadata">

**Author:** ![StrangerThing](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/strangerthing/32/12182_2.png) [@StrangerThing](https://community.dynatrace.com/u/StrangerThing)\
**Post date:** [October 2, 2024, 5:52pm UTC](https://community.dynatrace.com/t/filter-fields-by-value-using-dql-queries-for-precise-results/48101/5 "2024-10-02T17:52:42Z")

</div>

I see, you only want to remove the field and not the record. I’m not sure that’s possible with the fieldsRemove command as it doesn’t seem to take if statements. You may be able to use the countIf function if your summarize command to accomplish this, but I’m not exactly sure how your query is setup.

---

<div class="post-metadata">

**Author:** ![izabelarokita](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/izabelarokita/32/41812_2.png) [@izabelarokita](https://community.dynatrace.com/u/izabelarokita)\
**Post date:** [December 18, 2025, 2:01pm UTC](https://community.dynatrace.com/t/filter-fields-by-value-using-dql-queries-for-precise-results/48101/6 "2025-12-18T14:01:20Z")

</div>

Hey&nbsp;[@JhonU](https://community.dynatrace.com/user/75688)&nbsp;,  
I just wanted to check in and see if you still need help with this. If so, I’d be happy to look into it for you!&nbsp;:blush:  
Please let me know what works best for you.
