cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • 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.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

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

Divide column by reference point with conditions

Hi. I have a problem I can't get my head around. 

I am trying to create a new column which consists of another column divided by a reference point, but the problem is I have some conditions to include.

For simplicity I have added a generated datafile which I will refer to.

 

What I want to do is to take column Z and divide it by Z|X=c within each Y-group. The Y-groups are as you can tell not the same size.

 

SO C is the reference point, and for all Y-groups (1-9) I want to take column Z, and divide it by Z|X=c.

That is, in the new column all values where X=c will be 1 and the others will be Z / (Z|X=c).

 

I apologize for not being able to formulate myself in clearer terms, for various reasons I can not show my real dataset and English is not my native tounge. 

 

Any help is greatly appreciated.

V

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Divide column by reference point with conditions

Here is one formula that works

currentY = :Y;
:Z / :Z[(Current Data Table() << get rows where( :X == "c" & :Y == currentY ))[1]];

txnelson_0-1636019077377.png

 

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Divide column by reference point with conditions

Here is one formula that works

currentY = :Y;
:Z / :Z[(Current Data Table() << get rows where( :X == "c" & :Y == currentY ))[1]];

txnelson_0-1636019077377.png

 

Jim
Vvvv
Level II

Re: Divide column by reference point with conditions

Haha this was way easier than I thought it would be.

 

Thank you very much.

Recommended Articles