turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Data format help

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sep 25, 2017 2:44 PM
(1068 views)

Hi

I am trying to round a number but having some trouble. For example. I have the number .915 and .915000021 I have tried to use percision and Fixed Dec to round .915000021 to .915. However, after I use precision or Fixed Dec the .915000021is unchanged. Any ideas how I can change this? Also there is multiple instances like this, so editing the column would be the best solution for me.

Could I copy the column and use a formula to round everything then paste it and delete the orginal column?

any advise would be appreiaceted.

Solved! Go to Solution.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sep 26, 2017 1:23 AM
(1738 views)

JMP Numeric Formats change the way data appears, but not the underlying value. Probably you need the 'Round()' function, but as always, you should be cautious in modifying the data values themselves. Copy and paste the code below into a script window, do 'Edit > Run Script', then look at the formula columns:

```
New Table( "Formats and Rounding",
Add Rows( 10 ),
New Column( "Precise Value",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Random Normal() )
),
New Column( "Precise Value with 'Fixed Dec' Format",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 2 ),
Formula( :Precise Value )
),
New Column( "Precise Value with 'Precision' Format",
Numeric,
"Continuous",
Format( "Precision", 12, 2 ),
Formula( :Precise Value )
),
New Column( "Precise Value Rounded to 2 Decimal Places",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Round( :Precise Value, 2 ) )
)
)
```

1 REPLY

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Sep 26, 2017 1:23 AM
(1739 views)

JMP Numeric Formats change the way data appears, but not the underlying value. Probably you need the 'Round()' function, but as always, you should be cautious in modifying the data values themselves. Copy and paste the code below into a script window, do 'Edit > Run Script', then look at the formula columns:

```
New Table( "Formats and Rounding",
Add Rows( 10 ),
New Column( "Precise Value",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Random Normal() )
),
New Column( "Precise Value with 'Fixed Dec' Format",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 2 ),
Formula( :Precise Value )
),
New Column( "Precise Value with 'Precision' Format",
Numeric,
"Continuous",
Format( "Precision", 12, 2 ),
Formula( :Precise Value )
),
New Column( "Precise Value Rounded to 2 Decimal Places",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( Round( :Precise Value, 2 ) )
)
)
```