Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Correct Expression

I try to calculate the total patient in  branch 'A' where Initial examination = 1

i try:

if(BranchID={'A'}) and ([has initial examination] = {'1'}), count(PaientID))

but it doesn't working.

13 Replies
sasikanth
Master
Master

hi,

try some thing like below

use if condition inside Count function

COUNT( IF ( BranchID='A' and ([has initial examination] = '1', PaientID) )

Anonymous
Not applicable
Author

may be this:

=count({<BranchID={'A'},[has initial examination] = {'1'} >} distinct PaientID)


Not applicable
Author

Hi Mohammed, you can try this four options:

=count({<BranchID={'A'}, [has initial examination] = {1} >} distinct PaientID)


=count({<BranchID={'A'}, [has initial examination] = {'1'} >} distinct PaientID)


if(BranchID='A' and [has initial examination] =1, count( distinct PaientID))


if(BranchID='A' and [has initial examination] ='1', count( distinct PaientID))


It depends if [has initial examination] is a string or number.


I hope that it help you!


Regards, Agustin



Not applicable
Author

hi Mohmd,

i think below expression should work

=count({<BranchID={'A'},[has initial examination] = {'1'} >} distinct PaientID)

if not please share sample data to understnd the same properly