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.
| ID | Attendance Indicator | No - Show rate |
| X_1 | 0 | 0% |
| X_1 | 0 | 0% |
| X_1 | 2 | 33% |
| X_1 | 0 | 25% |
| X_2 | 2 | 100% |
| X_2 | 0 | 50% |
| X_3 | 0 | 0% |
| X_3 | 2 | 50% |
| X_3 | 2 | 66% |
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 )
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 )