cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
The Discovery Summit 2025 Call for Content is open! Submit an abstract today to present at our premier analytics conference.
Choose Language Hide Translation Bar
View Original Published Thread

Decimal Format Problem

Aam_jmp
Level IV

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