# Filter queries using expressions

**URL:** <https://community.tulip.co/t/filter-queries-using-expressions/5678>\
**Category:** General\
**Created:** [June 28, 2022, 2:00pm UTC](https://community.tulip.co/t/filter-queries-using-expressions/5678 "2022-06-28T14:00:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![safe](https://avatars.discourse-cdn.com/v4/letter/s/a4c791/32.png) [@safe](https://community.tulip.co/u/safe)\
**Post date:** [June 28, 2022, 2:00pm UTC](https://community.tulip.co/t/filter-queries-using-expressions/5678/1 "2022-06-28T14:00:36Z")

</div>

Hi Team,

I would like to make a query to return the results where the value in “quantity consumed” is less than 50% of “theoretical quantity”, and count them then using a count aggregation.  
I couldn’t find a way to define a filter with an expression. Is there any workaround I can use for this use case ?

Much appreciated!  
Safouane

 ![image](https://us1.discourse-cdn.com/flex020/uploads/agilemfg/original/2X/1/183a420f19f266bcff2ae0a9efbc84f53e7fa589.png)

---

<div class="post-metadata">

**Author:** ![HugoRichard](https://avatars.discourse-cdn.com/v4/letter/h/df788c/32.png) [@HugoRichard](https://community.tulip.co/u/HugoRichard)\
**Post date:** [June 29, 2022, 10:46am UTC](https://community.tulip.co/t/filter-queries-using-expressions/5678/2 "2022-06-29T10:46:46Z")

</div>

Hey Safouane, at the moment you could do that adding an additional column to your table where you would store: Quantity Consumed / Theoretical Quantity \* 100. You can then base your query to filter this new column (\<50%).  
Please let me know if this solution works for you.  
Hugo
