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
Rini_Kar
Level II

Count of records with specific values

Hi, 

I am working on a project where I have ID and attendance indicator for each ID (0 - Attended, 2 - Non - Attendance). I need to calculate the cumulative non - attendance rate as shown below. I need to know cumulative count of Non - attendance and divide by total count of that ID. This needs to be calculated on cumulative basis. 

Appreciate if anyone can help me with a formula / script to accomplish this.  Thanks in advance.

 

IDAttendance IndicatorNo - Show rate
X_100%
X_100%
X_1233%
X_1025%
X_22100%
X_2050%
X_300%
X_3250%
X_3266%
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Count of records with specific values

Here is a formula that will do what you want

Col Cumulative Sum( If( :Attendance indicator == 2, 1, 0 ), :ID ) /
Col Cumulative Sum( 1, :ID )
Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: Count of records with specific values

Here is a formula that will do what you want

Col Cumulative Sum( If( :Attendance indicator == 2, 1, 0 ), :ID ) /
Col Cumulative Sum( 1, :ID )
Jim
Rini_Kar
Level II

Re: Count of records with specific values

Thanks Jim for answering all my queries. You have been very helpful.