# Trying to use a non-additive metric to filter on a new metric

**URL:** <https://discourse.getdbt.com/t/trying-to-use-a-non-additive-metric-to-filter-on-a-new-metric/6931>\
**Category:** In-Depth Discussions\
**Tags:** best-practice, metrics\
**Created:** [February 22, 2023, 8:02pm UTC](https://discourse.getdbt.com/t/trying-to-use-a-non-additive-metric-to-filter-on-a-new-metric/6931 "2023-02-22T20:02:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mmanalyst](https://sea2.discourse-cdn.com/flex020/user_avatar/discourse.getdbt.com/mmanalyst/32/1853_2.png) [@mmanalyst](https://discourse.getdbt.com/u/mmanalyst)\
**Post date:** [February 22, 2023, 8:02pm UTC](https://discourse.getdbt.com/t/trying-to-use-a-non-additive-metric-to-filter-on-a-new-metric/6931/1 "2023-02-22T20:02:43Z")

</div>

Hi!

I had a strange use case with metrics and Lightdash, and wanted to see if others had run into the same problem:

I have a summarised data source, and from it I’ve create a metric called `metric_one_percentage` (which is just `sum(COL_A)`/ `sum(COL_B)`), and the dimension is ENTITY\_A.

So an example output for a monthly time grain would be:

 ![example](https://us1.discourse-cdn.com/flex020/uploads/getdbt/original/2X/2/2e25361ec0db8e95686f9fc2d814c844988943cc.png)

I want to create a second metric which shows the percentage of entities, of all the entities, where the `metric_one_percentage` exceeds a certain threshold, x.

So in essence the formula would be:  
`Number of entities with a metric_one_percentage >= x` **/** `Number of entities`

However I would also like this metric to have the flexibility with the time series that `metric_one_percentage` would have, that is, I don’t want to pre-define the time period for `metric_one_percentage` to be able to calculate the second metric. I would like the user to define the time grain when working in Lightdash.

Is this possible?
