PrevRoundNumber ( number )
Shows next lowest round number (as to determine a chart minimum)
Average rating: 4.3 (30 votes) Log in to vote
Joe Rovang - Show more from this author |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function finds the next lowest "round" number, based on whatever factor of ten the original number is based. For instance, 11 becomes 10; 200 becomes 100; 0.4 becomes 0.3; and -120 becomes -200. (In this function, a "round" number is regarded as an integer multiplied by some power of ten.)
This function might be useful for determining a chart's minimum scale (as in xmCHART): for example, if the minimum data point is -428, this function returns -500 as an appropriate chart minimum. It bumps already round numbers down (200 goes to 100), on the principle that a chart's data point should never lie directly on the minimum (An exception is made for zero.)
Comments
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.