cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
Choose Language Hide Translation Bar
Aam_jmp
Level IV

Decimal Format Problem

I have columns where I want to limit the decimal places to 2. Example, 0.335256 should be 0.34. I am using dt:ColumnName << Format( "Fixed Dec", 12, 2 ); and it works perfectly. However, some cells in the columns have values like: <0.00234 for which this Format outputs 0.00, whereas I want <0.00. How can I achieve this? Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Aam_jmp
Level IV

Re: Decimal Format Problem

Never mind, I figured I can use PValue to achieve what I wanted. So, the format is : dt:ColumnName << Format( "PValue", 6 ); I still cannot limit it to 2 decimals though!!

View solution in original post

2 REPLIES 2
Aam_jmp
Level IV

Re: Decimal Format Problem

Never mind, I figured I can use PValue to achieve what I wanted. So, the format is : dt:ColumnName << Format( "PValue", 6 ); I still cannot limit it to 2 decimals though!!

Jeff_Perkinson
Community Manager Community Manager

Re: Decimal Format Problem

You can use a Custom Format to get what you want.

 

In the Column Info window choose Format->Custom.

JMPScreenSnapz192.png

Then click the Set Custom Format format button.

JMPScreenSnapz193-2.png

You'll end up in a version of the Formula Editor which will allow you to reformat the value as you wish.

Ultimately it would look something like this.

JMPScreenSnapz194.png

-Jeff