Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello All,
I want to count the number of patients who responded to all the 3 questions : question 1 , 2 , 3.
But this expression is not working.
It does not give the number of patients how reponded the 3 questions , but rather the number of patients who answered one of the 3 questions.
=count({ <[question]={'question1'}, [question]={'question2'}, [question]={'question3}, [responded]= {'Yes'} >}distinct [KEY - Patient])
Many thanks in advance
You did not yet share how your data actually looks like.
To account for a possible response status per question, maybe one solution could be instead:
=Count({$<[KEY - Patient]=p({<[question]={'question1'},[responded]={'Yes'}>})*p({<[question]={'question2'},[responded]={'Yes'}>})*p({<[question]={'question3'},[responded]= {'Yes'}>})>} distinct [KEY - Patient])
Hi @youss123 !
Try: count({ <[question]={'question1', 'question2', 'question3'}, [responded]= {'Yes'} >}distinct [KEY - Patient])
Thank you for your reponse but it's not working 😕
Share a example of your data please.
maybe like this?
=count({$<[KEY - Patient]=p({<[question]={'question1'}>})*p({<[question]={'question2'}>})*p({<[question]={'question3'}>}), [responded]= {'Yes'}>} distinct [KEY - Patient])
Thank you for your reponse but it doesn't work either
Try below
=count({<[KEY - Patient]={“=count({<[responded]={‘Yes’}>}distinct [question])=3”}>}distinct [KEY - Patient])
Try this:
=count({<[KEY - Patient]=p({<[question]={'question1'},[responded]= {'Yes'}>*<[question]={'question2'},[responded]= {'Yes'}>*<[question]={'question3'},[responded]= {'Yes'}>})distinct [KEY - Patient])
You did not yet share how your data actually looks like.
To account for a possible response status per question, maybe one solution could be instead:
=Count({$<[KEY - Patient]=p({<[question]={'question1'},[responded]={'Yes'}>})*p({<[question]={'question2'},[responded]={'Yes'}>})*p({<[question]={'question3'},[responded]= {'Yes'}>})>} distinct [KEY - Patient])
or maybe:
=Count({$<[KEY - Patient]={"=Min(question='question1' and responded='Yes') and Min(question='question2' and responded='Yes') and Min(question='question3' and responded='Yes')"}>} DISTINCT [KEY - Patient])
?