May 13, 200520 yr Newbies Hello everyone, I'm kind of new to Filemaker Pro. I'm trying for filemaker to round a number up. For example.. I have a calculation that I want the result to be the nearest multiple of 10. For example if it's 84 then I would want my result to be 90.. I'm not sure if this is even possible but any help would be appreciated. Thank You!
May 13, 200520 yr This is not the prettiest solution but I think it works (havn't tried it though) . Don't remember if the "Let-function" is in FMP 6 but otherwise you can just put Ceiling(yourfield) and Right(Ceiling(yourfield)) directly in the calc Let( [ nm1=Ceiling(yourfield); nm2=Right(nm1;1) ]; nm1 + Case(nm2 "not equal to" 0; 10-nm1;0 ) ) ...couldn't get the not equal to sign into this post....
May 13, 200520 yr IIRC, there is no Ceiling() function in version 6. Try: n + Choose ( 1 + Sign ( Mod ( n , 10 ) ) , Mod ( n , 10 ) , 0 , 10 - Mod ( n , 10 ) ) This works in a fashion similar to Ceiling - always rounds up, i.e. in the direction of positive infinite. If you don't expect negative numbers, you can simplify to: ( Int ( n / 10 ) + not not Mod ( n / 10 ; 1 ) ) * 10
Create an account or sign in to comment