How to trim decimal digits on fabrik list calculation

mkainz

Member
I'm getting these kind of values on Fabrik list calculations: 433.17999999999995
How can i trim it to the two decimal digit?
 
Hmm, I'm surprised a Sum produced that. Usually the only place you get those results is in Avg (as that involves floating point division), but we provide a rounding setting for that. Is it possible one of the elements involved in that sum is producing a long floating point result? Like a calc element which does division?

The only way to customize calculations is with the "Custom Calc", where you can provide your own SQL query and PHP code to produce the results you want.

-- hugh
 
The summed numbers cames from formatted values with number_format function. By the way can you write me an example code of custom calc?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top