cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
Ressel
Level VI

Counting redundant rows using by variables - different outcome for continuous and nominal/character by variables?

Here I am counting redundant rows based on info held in 2 columns (Batch ID & Value [concentration]).

Col Cumulative Sum( 1, :Batch ID, :"Value [concentration]"n )

However, based on whether Value [concentration] is formatted as continuous or character variable in my table, a different result is obtained (see screenshots below).

 

Outcome with Value [concentration] as continuous variable (not what I want)

Ressel_0-1648715514040.png

 

 

Outcome with Value [concentration] as character variable (what I want)

Ressel_1-1648715604338.png

 

 

Is there some computational issue (missing values...?) I need to wrap my head around to understand this?

Thank you!

 

P.s.: I realize that it may appear nonsensical to count combinations of Batch ID and missing values, but there are practical reasons for this at the time of writing.

Edit: Revised "nominal" to "character" in text.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Counting redundant rows using by variables - different outcome for continuous and nominal by variables?

Some with more knowledge will have to provide correct answer why this is happening with numeric columns (your second example has Character column, not just Nominal numeric column), but you might be able to handle it depending on what you are doing by using something like:

Col Cumulative Sum( 1, :Batch ID, Col Stored Value(:"Value [concentration]"n ))

or

Col Cumulative Sum( 1, :Batch ID, IsMissing(:"Value [concentration]"n ))
-Jarmo

View solution in original post

3 REPLIES 3
jthi
Super User

Re: Counting redundant rows using by variables - different outcome for continuous and nominal by variables?

Some with more knowledge will have to provide correct answer why this is happening with numeric columns (your second example has Character column, not just Nominal numeric column), but you might be able to handle it depending on what you are doing by using something like:

Col Cumulative Sum( 1, :Batch ID, Col Stored Value(:"Value [concentration]"n ))

or

Col Cumulative Sum( 1, :Batch ID, IsMissing(:"Value [concentration]"n ))
-Jarmo
Ressel
Level VI

Re: Counting redundant rows using by variables - different outcome for continuous and nominal by variables?

Yes, sorry for using incorrect terminology. I have revised that now in the original post.

I changed the concentration data temporarily to character format, since I know (from experience) that this is working.

Thank you for your reply! 

Ressel
Level VI

Re: Counting redundant rows using by variables - different outcome for continuous and nominal by variables?

Thank you for the example by the way. (Downloaded & saved.) I still find it illogical and weird that the numerical column as by variable doesn't recognize the missing value.