Advertisement

Empower Custom Field Round Operator

Discussions about chromatography data systems, LIMS, controllers, computer issues and related topics.

6 posts Page 1 of 1
Hello,

Is there anybody out there who knows how the
ROUND operator works when you use it in a
Custom Field.
I think that you must use it like this
ROUND(Field,x)
Where field is the number you want to round and
x is the number of signicant figuers you want.
I'we tried some different things to get 3 significant number
x=3
x=0.001
x=1E-3

But they all give me rubbich as result, but still a result

Anybody.........
Please.......

Best regards / Johan

We typically use it as a modifier to a regular calculation.
ie
Retention Time/CCalRef1[Retention Time] (generating a relative retention time)
becomes
ROUND(Retention Time/CCalRef1[Retention Time],-2)

the same thing limited to 2 decimal places - either way, a calculated field (no, I do not know why it's -2 instead of 2, I just found a working example).

Gererally speaking, I prefer limiting precision either when writing the custom calculation or in the appropriate column of a report's table(s).

As far as i know, all of these options limit you to a specific number of decimal places, they know nothing of significant figures...
Thanks,
DR
Image
Your example will round at three places and replace the remaining precision with zeros. The round function works fine.

You can also truncate using the round function

hi

hi guys
How do you get it to truncate?
You said that round -2 will truncate to 3 then round to 2
But how do we just truncate?

And another thing was in the report when we put precision 2 it rounds to 2decimals
How do we make it truncate at 2?
Should i just put a precision of 3?

vish

Altering precision simply alters how many decimal places a number is displayed to, with the last place being rounded. The number itself is not altered for calculation purposes.

Using the round function actually alters the number and this can alter calculated results, so use this function with caution.
Thanks,
DR
Image

Truncating:

If you subtract half of the precision you want to round to, and then round, it is equivalent to truncating. The only problem is that the number will be truncated but be followed by a string of zeros.

So, to truncate to two decimals place, subtract 0.005, then round to 2 places.
6 posts Page 1 of 1

Who is online

In total there are 145 users online :: 1 registered, 0 hidden and 144 guests (based on users active over the past 5 minutes)
Most users ever online was 5108 on Wed Nov 05, 2025 8:51 pm

Users browsing this forum: Baidu [Spider] and 144 guests

Latest Blog Posts from Separation Science

Separation Science offers free learning from the experts covering methods, applications, webinars, eSeminars, videos, tutorials for users of liquid chromatography, gas chromatography, mass spectrometry, sample preparation and related analytical techniques.

Subscribe to our eNewsletter with daily, weekly or monthly updates: Food & Beverage, Environmental, (Bio)Pharmaceutical, Bioclinical, Liquid Chromatography, Gas Chromatography and Mass Spectrometry.

Liquid Chromatography

Gas Chromatography

Mass Spectrometry