I would like to get an accumulated Break Even Point(BEP) by using tsvb and you could see the attachment how I calculated.
Currently, I divide accumulated revenue by accumulated cost in a percentage format. On these percentage values, I just would like to see the values that are over 100% only since I am looking for BEP. Is there any way that I can put a filter on top of the calculated value?
You can set a high value for the clamp to be sure to never reach it (i.e. 1000000% => max = 10000) and write the following:
clamp( (params.rev / params.cost) - 1, 0, 10000)
Explanation:
(params.rev / params.cost) - 1 offset by 100% the computation
clamp( ..., 0, 10000) keeps the result within 0 and 1000000 (0%-1000000%)
because of the offset, any value below 100% will go negative and the clamp will rewrite it as 0%. Anything above 100% will be kept as is (as longs as it does not pass 1000000%) and will be shown
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.