We found a bug when using Text() function. My purpose is to show a in

We found a bug when using Text() function.

My purpose is to show a inputted value in predefined format, by using Text() function. the output is fine except some scenario.
For example, if the input value is 25000.01, expected result should be $25000.01
but the actual result is $25000.00.

Please advise.


OriginalPostID-148994

OriginalPostID-148994

  Discussion posts and replies are publicly visible

Parents
  • I would rely on fixed function for rounding the number to certain number of decimal places and add commas to numeric values if required. It gives me correct result always. Text function works perfectly fine if you have correct format in place. Format may or may not work for some scenarios such as the one you mentioned.

    For instance, this expression gives me exact $16,383.30.
    dollar(
    fixed(16383.3,2,false()) /**Round upto 2 decimal places and show commas*/
    )
Reply
  • I would rely on fixed function for rounding the number to certain number of decimal places and add commas to numeric values if required. It gives me correct result always. Text function works perfectly fine if you have correct format in place. Format may or may not work for some scenarios such as the one you mentioned.

    For instance, this expression gives me exact $16,383.30.
    dollar(
    fixed(16383.3,2,false()) /**Round upto 2 decimal places and show commas*/
    )
Children
No Data