Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two fields, fieldX with values of 1 and 0, and fieldY with values of 1 and 0.
I want to count how many instances a patient had X.
I want to count how many instances a patient had Y.
And I want to count how many instances a patient had X and Y.
Any ideas?
Thank you
My problem is, I keep double counting the variables and i need help not to do that....I want to create a variable that gives me one number, for those three instances above!
Have you tried normal set analysis
Count( {<FieldX= {"1"}>}ID) to calculate no.of instances of X
Count( {<FieldY= {"1"}>}ID) to calculate no.of instances of Y
Count( {<FieldX= {"1"}, FieldY={"1"}>}ID) to calculate no.of instances of X and Y
Hi,
maybe some solutions could be:
tabPatient:
LOAD RecNo() as PatientID,
Round(Rand()) as X,
Round(Rand()) as Y
AutoGenerate 30;
tabFieldTemp:
CrossTable (Field,FieldValue)
LOAD PatientID,
X,
Y
Resident tabPatient;
tabField:
LOAD PatientID,
Field
Resident tabFieldTemp
Where FieldValue=1;
DROP Table tabFieldTemp;
hope this helps
regards
Marco