### constants

#### In Graphite, how to cap data to a constant when data is above that constant?

```I thought that my request would be pretty common but I haven't been able to find a solution for it.
The subject/summary says it all, but to give more color, I have a metric that is typically between 0 and 100 but in some weird cases it shoots up to a few 1000s which dwarfs the rest of the 0-100 data.
My goal is that when the data is beyond 100 set it as say 110 so that I know it's a value is beyond 100.
The only thing I could find is removeAboveValue() but when used it looks as if the data is missing.
Thanks!
```
```The simplest way is to use transformNulls so query would look like:
transfromNull(removeAboveValue(some.metric.avg, 100), 110)
Note that above will also set 110 to the real gaps. Of course you could use again transformNull in the origin metric to mark gaps as ... -1 (or whatever)
transfromNull(removeAboveValue(transfromNull(some.metric.avg, -1), 100), 110)
But this introduces magic null has value, besides it's bad (misleading) it's not always possible (if metric can have negative values, zero or whatever).
Next solution is ...
prepare line with only exceeding datapoints and set theirs value to 110. It may be done in many ways. Let's take some simple approach:
a. get only point above 100
removeBelowValue(some.metric.avg, 100)
b. reduce its value to 1 using division by the same metric:
divideSeries(removeBelowValue(some.metric.avg, 100), removeBelowValue(some.metric.avg, 100))
c. set value to 110 - multiple by 110:
scale(divideSeries(removeBelowValue(some.metric.avg, 100), removeBelowValue(some.metric.avg, 100)),110)
merge the prepared metric with the one with values below threshold (using removeAboveValue). As merge function, in this case, use minSeries
minSeries(
removeAboveValue(some.metric.avg, 100),
scale(
divideSeries(
removeBelowValue(some.metric.avg, 100),
removeBelowValue(some.metric.avg, 100)
),
110
)
)```

### Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization