Choose Language Hide Translation Bar
Rini_Kar
Community Trekker

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%
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
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
Highlighted
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

Highlighted
Rini_Kar
Community Trekker

Re: Count of records with specific values

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