
1. Re: Rounding trailing 0's in decimals
Ken Flerlage Oct 2, 2018 7:48 AM (in response to Yosef Zaverukha) 
2. Re: Rounding trailing 0's in decimals
Yosef Zaverukha Oct 2, 2018 10:59 AM (in response to Ken Flerlage)Thanks Ken, this is great! One thing as of now though is that with that, if it ends with the 0, it'll show up as "3." rather than just "3". So it adds the character that is the decimal there no matter what. Is it possible to hide that as well?

3. Re: Rounding trailing 0's in decimals
Ken Flerlage Oct 2, 2018 11:33 AM (in response to Yosef Zaverukha) 
4. Re: Rounding trailing 0's in decimals
Yosef Zaverukha Oct 2, 2018 11:43 AM (in response to Ken Flerlage) 
5. Re: Rounding trailing 0's in decimals
katie.kilroy Oct 2, 2018 11:48 AM (in response to Yosef Zaverukha)Hi Yosef  does this video post from Andy Kriebel help? Using the Modulo Function to Conditionally Format Numbers  YouTube
Thanks, Katie

6. Re: Rounding trailing 0's in decimals
Ken Flerlage Oct 2, 2018 11:50 AM (in response to Yosef Zaverukha)Okay, can you try creating a calculated field like this then using that to display your numbers?
IF ROUND(SUM([Your Number]),0)  SUM([Your Number]) < .05 THEN
// Number would be rounded down to a whole number
ROUND(SUM([Your Number]),0)
ELSE
// Round to nearest 1 decimal place.
ROUND(SUM([Your Number]),1)
END

7. Re: Rounding trailing 0's in decimals
Yosef Zaverukha Oct 2, 2018 12:06 PM (in response to Ken Flerlage)Ken, I think this is the right track. I've been messing around with it and in a few cases it currently won't work. Let's say for example the actual average is 2.25. Based on the way the formula is now, it would do IF 2.0  2.25 <0.5, which in this case is .25 and thus is <0.5 and so it is true, causing 2.25 to round to 2 rather than to 2.3.
I think we would just need to modify this formula a little, just trying to think of how exactly.

8. Re: Rounding trailing 0's in decimals
Ken Flerlage Oct 2, 2018 1:11 PM (in response to Yosef Zaverukha)1 of 1 people found this helpfulThat's rightROUND was the wrong approach in the IF statement. Let's switch the order a bit and use INT instead, which will truncate the decimal value.
IF SUM([Your Number])  INT(SUM([Your Number])) < .05 THEN
// Number would be rounded down to a whole number
ROUND(SUM([Your Number]),0)
ELSE
// Round to nearest 1 decimal place.
ROUND(SUM([Your Number]),1)
END
So, in this case, the first number will always be larger than the second (or the same)it will never be negative.

9. Re: Rounding trailing 0's in decimals
Yosef Zaverukha Oct 2, 2018 1:34 PM (in response to Ken Flerlage)Ken Flerlage thank you, you beautiful soul. It worked!
(And as another part to the thank you, I remember I've used the tutorials on your blog so many times and I immediately recognized your name hahaha)

10. Re: Rounding trailing 0's in decimals
Ken Flerlage Oct 2, 2018 1:36 PM (in response to Yosef Zaverukha)My pleasure! And I'm so happy that you've found my blog helpful!!