cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
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.