cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • JMP Security Notice: CVE-2026-109618 and CVE-2026-109619

    JMP promptly initiated a review of its products, services, and relevant infrastructure for exposure to CVE-2026-109618 and CVE-2026-109619.

    Our assessment of JMP products has not identified exposure to these vulnerabilities. Where remediation was required within supporting environments, appropriate security updates and controls have been applied and validated.

    We have identified no evidence of successful exploitation or unauthorized access to JMP systems or customer information associated with these vulnerabilities.

    JMP continues to monitor the issue and relevant vendor guidance. No action is required by JMP customers at this time.

  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.

Discussions

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

Col Score in reverse order options?

Hey everyone,

Is there an easy way to reverse the order using the Col Score() function?  The default is that it scores it by descending order, so if something has the highest value it is given the highest score and the smallest value is given the score of 1.  I'd like the highest value to be a score of 1 and the lowest value to be the lowest score.

 

Thanks for any input!

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Col Score in reverse order options?

Here is how I would do it

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "Score Height",
	formula( col score(:Height))
);
New Column( "Height reverse",
	Formula( col max(:height)-:height + col min(:height))
);
current data table()<<rerun formulas;
New Column( "score Height reverse",
	set each value( col score(:height reverse))
);

current data table() << delete columns(:height reverse);
Jim

View solution in original post

3 REPLIES 3
txnelson
Super User

Re: Col Score in reverse order options?

Here is how I would do it

Names Default To Here( 1 );
Open( "$SAMPLE_DATA/Big Class.jmp" );
New Column( "Score Height",
	formula( col score(:Height))
);
New Column( "Height reverse",
	Formula( col max(:height)-:height + col min(:height))
);
current data table()<<rerun formulas;
New Column( "score Height reverse",
	set each value( col score(:height reverse))
);

current data table() << delete columns(:height reverse);
Jim
jthi
Super User

Re: Col Score in reverse order options?

You can combine it with Col Number for example

Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt << New Column("Score Height", Formula(Col Score(:height)));
dt << New Column("Score Height Reverse", Formula(Col Number(:height) - Col Score(:height) + 1));

dt << New Column("Score Height by age", Formula(Col Score(:height, :age)));
dt << New Column("Score Height by age Reverse", Formula(Col Number(:height, :age) - Col Score(:height, :age) + 1));

Write();

jthi_0-1790138853222.png

 

-Jarmo
shampton82
Level VII

Re: Col Score in reverse order options?

Thanks for the help @jthi and @txnelson .  Using your guidance, I came up with this that is working well

For use with a single column

Col Score( :height ) * -1 + 1 + Col Maximum( Col Score( :height ) )

For use with by columns:

Col Score( :height, :sex ) * -1 + 1 + Col Maximum( Col Score( :height, :sex ), :sex )

Appreciate the quick responses!

 

Steve

Recommended Articles