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
chris_G_ttu
Level II

Data format help

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.

Capture.PNG

Capture 2.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
ian_jmp
Staff

Re: Data format help

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 ) )
	)
)

View solution in original post

1 REPLY 1
ian_jmp
Staff

Re: Data format help

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 ) )
	)
)