cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP will suspend normal business operations for our Winter Holiday beginning on Wednesday, Dec. 24, 2025, at 5:00 p.m. ET (2:00 p.m. ET for JMP Accounts Receivable).
    Regular business hours will resume at 9:00 a.m. ET on Friday, Jan. 2, 2026.
  • We’re retiring the File Exchange at the end of this year. The JMP Marketplace is now your destination for add-ins and extensions.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

How to add columns with empty data

I have a table similar to this:

 xyz xyzxyz
aa12  .3
bb    ..
cc2 3 .5

The columns have rows containing both numeric and empty data.

I want to create a new column (xyz) where I add the data in column x, y and z.

In other words, I want the result to look like the green xyz-column.

 

The problem is, when I run my script, I get the result in the red xyz-column..

How do I add columns with empty data?

 

I use the following script to create the xyz-column:

dt << New Column("xyz",

         Numeric,

         Formula(:Name("x")+:Name("y")+:Name("z")

         )

         );

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to add columns with empty data

Use:

dt << New Column( "xyz", Numeric, Formula( Sum( :x, :y,:z ) ) );

 The Sum() function ignores missing values.

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to add columns with empty data

Use:

dt << New Column( "xyz", Numeric, Formula( Sum( :x, :y,:z ) ) );

 The Sum() function ignores missing values.

Jim

Re: How to add columns with empty data

Thank you, it works :)

Recommended Articles