- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
How to multiply column values without creating another column?
I have a column with decimal values that needs to be multiplied by 100. Is there other ways to do it without creating another column with formula? Is it possible to do it on the same column?
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to multiply column values without creating another column?
The easiest way to do this is to write a little script. If the name of your column that you want to change is called "The Column", the following script will
For Each Row( :The Column = :The Column * 100 );
Jim
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to multiply column values without creating another column?
The easiest way to do this is to write a little script. If the name of your column that you want to change is called "The Column", the following script will
For Each Row( :The Column = :The Column * 100 );
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to multiply column values without creating another column?
I tried re-creating this with a For Loop, but doesn't work.
dtcols = {"Score1", "Score2"};
For( i = 1, i <= N items (dtcols), i++,
For Each Row( dtcols[i] = dtcols[i] * 100 );
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to multiply column values without creating another column?
You need to tell JMP the element from the list is a column.
dtcols = {"Score1", "Score2"};
For( i = 1, i <= N Items( dtcols ), i++,
For Each Row( As Column( dtcols[i] ) = As Column( dtcols[i] ) * 100 )
);
BTW, a simpler form to use is with a For Each() function
For Each( {col}, dtcols,
For Each Row( As Column( col ) = As Column( col ) * 100 )
);
Jim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to multiply column values without creating another column?
Thank you! I'm learning a lot ^^