Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Need help on How to use count ?

Hello Everyone,

I need one assistance in creating a formula on counting the no of employee based on their EmpId when 'Type of Program'- value is

'"Occ P.I." , "Occ T.I.", and "Occ TWP". I am currently using this formula-

=((if(ProgramTerm='Occ TWP',Count(EmpId),0)) + (if(ProgramTerm='Occ T.I.',Count(EmpId),0))+(if(ProgramTerm='Occ P.I.',Count(EmpId),0)))

But it is only giving the result count of "Occ TWP". I wanna how to get the total count of this .

Please find attached excel file along with this that contains those values.

Any help would be greatly appreciated !

Thank You ! 

11 Replies
Mark_Little
Luminary
Luminary

Hi

Try

Count({<[ProgramTerm]={'Occ TWP'},>}DISTINCT EmpId) + Count({<[ProgramTerm]={'Occ T.I'},>}DISTINCT EmpId) +

Count({<[ProgramTerm]={'Occ P.I'},>}DISTINCT EmpId)

Any doubts split them out and check the results.

Mark

Anonymous
Not applicable
Author

You can use this also

Count({<[ProgramTerm]={'Occ TWP','Occ T.I','Occ P.I'}>}EmpId)

vinieme12
Champion III
Champion III

Count({<[ProgramTerm]={'Occ TWP','Occ T.I','Occ P.I'}>} DISTINCT EmpId)  << add distinct if you have duplicates and want to count only unique values

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable
Author

Hi

please find the QVW as per your requirement .

I am assuming  Empid is the field name :Associate Number

MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Screenshot_1.jpg

Check the attachment please for available options.

Not applicable
Author

Hi Mark ,

Thanks it is working now. I have one more query of you can help . I and trying to use greater than and  less than value like the range of value to count . using this formula-

= Count({<[Length] = {">=63" and "<=84" } >}Distinct Empid)

But it is not working and throwing . Please correct this formula , where and what I am missing ?

Not applicable
Author

Hi Vineeth,

Thanks it is working now. I have one more query of you can help . I and trying to use greater than and  less than value like the range of value to count . using this formula-

= Count({<[Length] = {">=63" and "<=84" } >}Distinct Empid)

But it is not working and throwing . Please correct this formula , where and what I am missing ?

Not applicable
Author

Hi Mindaugas,

Thanks it is working now. I have one more query of you can help . I and trying to use greater than and  less than value like the range of value to count . using this formula-

= Count({<[Length] = {">=63" and "<=84" } >}Distinct Empid)

But it is not working and throwing . Please correct this formula , where and what I am missing ?

Not applicable
Author

Hi Everyone ,

Thanks it is working now. I have one more query of you can help . I and trying to use greater than and  less than value like the range of value to count . using this formula-

= Count({<[Length] = {">=63" and "<=84" } >}Distinct Empid)

But it is not working and throwing . Please correct this formula , where and what I am missing ?

Please help me on this thing also.

Thank You !

Regards,

Animesh