Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a calculation value 2.951885674 i want to limit this value 1 digit/2digits after decimal like 2.9 and 2.95...how can we do this..
num('2.958885674','#.##')
Just go to Properties<<<<Number<<<<
and then you can select Fixed to option in Number Format Setting and choose the Decimals..
You can also check other options for your better knowledge..
Hi
You did not say whether you wanted to change the display format or the number itself. num(2.958885674,'#.##') changes the display format, but not the underlying value. To change the number, use round(2.958885674, 0.01).
To illustrate
num(2.958885674,'#.##') <> num(2.9580000,'#.##')
but
round(2.958885674, 0.01 = round(2.9580000, 0.01)
Regards
Jonathan
Thnx for your replies. Jonthan its just for display My actual values is 2.9518876433449 if i use num(2.9518876433449, '#.##') its giving exact value i.e 2.95 but if u use num(2.9518876433449, '#.#') it giving 3.0 but my expected values is 2.9,For round function also its giving same result for both the cases..
Try with this
floor(2.9518876433449)+left(Frac(2.9518876433449),3) gives 2.9
floor(2.9518876433449)+left(Frac(2.9518876433449),4) gives 2.95
Hope it helps
Hi Anil,
You can also try like this
=Num(Floor(2.9518876433449) & '.' & Left(SubField(2.9518876433449, '.', 2), 1)) for 2.9
=Num(Floor(2.9518876433449) & '.' & Left(SubField(2.9518876433449, '.', 2), 2)) for 2.95
Hope this helps you.
Regards,
Jagan.