
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Graph Expression : count
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
- Subscribe by Topic:
-
Chart
-
Developers
-
dimension
-
expression
-
filter
-
General Question
-
Set Analysis
-
Variables
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @youss123 !
Try: count({ <[question]={'question1', 'question2', 'question3'}, [responded]= {'Yes'} >}distinct [KEY - Patient])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reponse but it's not working 😕

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Share a example of your data please.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
maybe like this?
=count({$<[KEY - Patient]=p({<[question]={'question1'}>})*p({<[question]={'question2'}>})*p({<[question]={'question3'}>}), [responded]= {'Yes'}>} distinct [KEY - Patient])

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your reponse but it doesn't work either


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try below
=count({<[KEY - Patient]={“=count({<[responded]={‘Yes’}>}distinct [question])=3”}>}distinct [KEY - Patient])
If a post helps to resolve your issue, please accept it as a Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try this:
=count({<[KEY - Patient]=p({<[question]={'question1'},[responded]= {'Yes'}>*<[question]={'question2'},[responded]= {'Yes'}>*<[question]={'question3'},[responded]= {'Yes'}>})distinct [KEY - Patient])


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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])


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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])
?

- « Previous Replies
-
- 1
- 2
- Next Replies »