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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Rdouto
Contributor II
Contributor II

How to count the number of value in a field?

Hello,

I am on Qlik sense.

I have a field where there are 3 possible different value : "Top priority", "Escalation" and "no value".

How can I count the number of "Top priority" in the field? I don't understand how I can use the function "count" :

I tried this :

count([Blocking points (color codes)] = 'Top Priority')

But it does not work,

Thank you for your help,

1 Solution

Accepted Solutions
arulsettu
Master III
Master III

If you are looking for distinct "Top priority" then try below

count({<[Blocking points (color codes)]={'Top Priority'}>} distinct [Blocking points (color codes)])

if not share the sample app with the expected output.

 

View solution in original post

5 Replies
Taoufiq_Zarra

@Rdouto 

can u share a sample data and the expected output ?

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
arulsettu
Master III
Master III

Maybe try like this

count({<[Blocking points (color codes)]={'Top Priority'}>}[Blocking points (color codes)])

Rdouto
Contributor II
Contributor II
Author

Thank you @arulsettu  I think it is working!

However I have another issue. My data base is built like this : 

Rdouto_0-1598872697350.png

I had several values in a cell so I had to split the rows with the function : subfield 

Therefore, the code above counts all the rows where "Top priority" appears, even when the rows are repeated (I hope you understand what I mean) 

I would like to put a "distinct", not on [Blocking points (color codes)], but on the field [Project name] in this code. How can I do that ?

Thank you for your help!

arulsettu
Master III
Master III

If you are looking for distinct "Top priority" then try below

count({<[Blocking points (color codes)]={'Top Priority'}>} distinct [Blocking points (color codes)])

if not share the sample app with the expected output.

 

Rdouto
Contributor II
Contributor II
Author

I tried this : 

count({<[Blocking points (color codes)]={'Top priority'}>} distinct [Project Name]) 

And it seems to work, thank you very much @arulsettu !