cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Submit your abstract to the call for content for Discovery Summit Americas by April 23. Selected abstracts will be presented at Discovery Summit, Oct. 21- 24.
Discovery is online this week, April 16 and 18. Join us for these exciting interactive sessions.
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.