In this tip, we will learn how to truncate numbers in a Custom Field.
In Tip 227, we learned how to round numbers. There may be times when you need to simply truncate or shorten a number without rounding, to accomplish this, we use the Round function in a Custom Field.
Figure 1 is a summary of the syntax used for the Custom Fields used to truncate numbers either to the left or the right of the decimal point.
In the first example, you want to truncate the USP signal to noise ratio (s/n) to the second number to the right of the decimal point.
Create a Custom Peak field, ‘Data Type Real’.
The result is a truncated value of the USP signal to noise ratio (s/n).
In the second example, you want to truncate Peak Area to the second number to the left of the decimal point. Peak Area is a real number, however, Empower defaults to displaying Area as a whole number.
Create another Custom Peak field, ‘Data Type Real’.
The result is a truncated value of the Peak Area.
It’s that easy!
You can use either the Pro or QuickStart interface for this tip.
Neil provides internal support for Empower CDS software and is focused on developing laboratory software solutions that help organizations achieve their scientific and operational objectives.
¿Necesita ayuda? Contactar con un experto de Waters.