Using SAS 9.4
I have multiple questions with this post.
I need to sum across the column to create a total volume. However, I will not be adding all columns I need to add all the columns that are NOT zero or the column to the immediate left of a zero but I am not sure how to code to make this possible. As you can see from the image I attached the column of a zero varies which means the column to the immediate left varies. Each row is a unique study ID. I also need a count of how many measurements went into the total volume. I need to do this with multiple groupings of variables
I have time points pre, 2 week and, 6 week. In each time point are SL and CL measurements. Within each SL and CL I need the same count of measurements across all 3 time points. So that would be 6 individuals counts that must be the same in order to sum those into one final total column.
This is as clear as mud but I am happy to try answer answer questions about the endpoints I want. Before you ask I am prohibited from posting any data, I realize it would make it easier but those are the rules. Thank you for any thoughts!