Hello All,
Wanted to ask a question regarding counting of rows. I am attaching a data table which should hopefully illustrate the example.
So I have data where the main variable is density of features. There is a unique value of the density per each ROI, per each sample (ID). In the normalized variable I am taking each density value per each ROI per each sample with unique ID and dividing by the whole population median and get a fraction. In the next column I take this fraction and evaluate if it matches my spec limits (here set at inside spec limit if variable is larger than 0.75 and smaller than 1.25).
What I would like to finally get is to count the number of inidividual ROI regions which are within the spec limit divided by the total number of ROIs per each unique ID sample (sometimes total number of ROIs are not the same between IDs)
I have tried to do this in a scripted fashion working with columns withing the original table but am having trouble. I am able to do a query which can tell me how many ROIs within and outside the spec limit there are for each unique ID but am having trouble scripting that and divinding by the total number of ROIs per given ID.
Any help is appreaciated.