Choose Language Hide Translation Bar
Highlighted
lwx228
Level VII

Re: How Do I Transfer Excel COUNTIF and MATCH functions into JMP

dt << new Column("VS", formula(nrows(Loc(Evallist({:AB, :BC, :CD, :DE, :EF}), -1))));

 

How does this code need to be modified to count the -1 of the line and the 2 lines above (3 lines in total)?

 

Thanks!

Highlighted
txnelson
Super User

Re: How Do I Transfer Excel COUNTIF and MATCH functions into JMP

Here are the 2 formulae that I came up with to replicate your spreadsheet

For YS

Sum(
	:Name( "m(AB)" ) == -1,
	:Name( "m(BC)" ) == -1,
	:Name( "m(CD)" ) == -1,
	:Name( "m(EF)" ) == -1,
	:Name( "m(FG)" ) == -1,
	:Name( "m(GH)" ) == -1,
	:Name( "m(HI)" ) == -1,
	:Name( "m(IJ)" ) == -1,
	:Name( "m(JK)" ) == -1,
	:Name( "m(KL)" ) == -1,
	:Name( "m(LM)" ) == -1,
	:Name( "m(MN)" ) == -1
)

For PD

Contains(
	Char( :Name( "m(AB)" ) ) || Char( :Name( "m(BC)" ) ) ||
	Char( :Name( "m(CD)" ) ) || Char( :Name( "m(EF)" ) ) ||
	Char( :Name( "m(FG)" ) ) || Char( :Name( "m(GH)" ) ) ||
	Char( :Name( "m(HI)" ) ) || Char( :Name( "m(IJ)" ) ) ||
	Char( :Name( "m(JK)" ) ) || Char( :Name( "m(KL)" ) ) ||
	Char( :Name( "m(LM)" ) ) || Char( :Name( "m(MN)" ) ),
	"-1"
)

 

Jim
Highlighted
sellerm
Level I

Re: How Do I Transfer Excel COUNTIF and MATCH functions into JMP

Thanks for your help as well Jim, you and Vince solved my issue.

Article Labels

    There are no labels assigned to this post.