Tsvb calculation


I have a question regards to tsvb calculation.

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?

I am expecting to do something like this

 (params.rev / params.cost) > 100%

Thank you!

Hi @paigekim ,

I think you could hijack the clamp tinymath to do what you want (here's a Lens example with Formula)

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)


  • (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
1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.