cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Register to see how to import and prepare Excel data on Jan. 30 from 2 to 3 p.m. ET.

Discussions

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

Formula: check for the presence of a value in a row

Hello,

I have a set of columns that can only take the values True of False. I am trying to make a new formula column that would take the value false if any of the column in this row has the value false. Else it would return the value True.

Could anyone help me with this please? I don't understand how to get an if condition on several values of a row.

 

Thanks

2 ACCEPTED SOLUTIONS

Accepted Solutions
mmarchandFSLR
Level VI

Re: Formula: check for the presence of a value in a row

This column formula will return "False" if any value in the list of columns is "False" and "True" otherwise.

 

Choose( !Contains( Eval List( {:Column 1, :Column 2, :Column 3, :Column 4} ), "False" ),
	"True",
	"False"
)

View solution in original post

Re: Formula: check for the presence of a value in a row

Instead of using Character strings "True" / "False", would you consider encoding your data as Numeric, 1 / 0? Then the formula you need is simply the product of the columns. 

You could use Column Properties -> Value Labels to display the numeric 1/0 data entries as True/False. 

View solution in original post

3 REPLIES 3
mmarchandFSLR
Level VI

Re: Formula: check for the presence of a value in a row

This column formula will return "False" if any value in the list of columns is "False" and "True" otherwise.

 

Choose( !Contains( Eval List( {:Column 1, :Column 2, :Column 3, :Column 4} ), "False" ),
	"True",
	"False"
)

Re: Formula: check for the presence of a value in a row

Instead of using Character strings "True" / "False", would you consider encoding your data as Numeric, 1 / 0? Then the formula you need is simply the product of the columns. 

You could use Column Properties -> Value Labels to display the numeric 1/0 data entries as True/False. 

Re: Formula: check for the presence of a value in a row

Thanks, both work great!

Recommended Articles