Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I would like to round to the eleventh digit.
I tried the function: Round(Sales,11,0.01). But this is not the expected result.
Please could tell how can I do that.
Many thanks in advance for your help.
You could also use an expression to define the digits of the rounding, maybe with:
= round(14.5489627892171, 1 / pow(10, 😎)
and you could also create a customized function with the help of a variable for it, for example:
eRound:
round($1, 1 / pow(10, $2))
and then calling it with:
$(eRound(14.5489627892171, 8))
- Marcus
Try: Round(Sales, 0.00000000001)
- Marcus
Sou, just providing the Help link for the Round function as well in addition to what Marcus posted.
If you find things are not working per what is documented in the Help, there are only two things I could suggest, check that you are running the latest service release (SR) for the major version you are running, these are:
11.20 SR19
12.10 SR11
12.20 SR9
12.30 SR3
12.40 SR1
If you are on one of those, then this may be something defect related, and will likely be best to open a support case with us at that point, if you can provide an example app if you do that, that should help us check things pretty quickly.
Regards,
Brett
Hello @marcus_sommer , @Brett_Bleess ,
Thank you both for your help.
@marcus_sommer : Your solution give me the result expected. I wonder if there is a way to optimize the second parameter of the function round(), for example to precise directly the number of decimals. Maybe not with the function round(), but if there is another function in QVW I will be really interesting to know it ?!
@Brett_Bleess : Thank you for sharing the link.
You could also use an expression to define the digits of the rounding, maybe with:
= round(14.5489627892171, 1 / pow(10, 😎)
and you could also create a customized function with the help of a variable for it, for example:
eRound:
round($1, 1 / pow(10, $2))
and then calling it with:
$(eRound(14.5489627892171, 8))
- Marcus