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: 
Edvin
Creator
Creator

Counting value where value is within group (chart)

Hello guys,

Came back working with Qlik Sense and struggling hard for even simplest things.

I attached an example excel file, would greatly appreciate if you can check it out.

I tried writing the measure expression like:

count({<[Process]={'Done'}>} [ID number])

It works, but in chart table it only shows the count for (blank) company name. It's all good, I understand that.

But then I tried like:

aggr(count({<[Process]={'Done'}>} [ID number]),[Company name])

But that thing ain't working properly.

If there exists [Process]=DONE in [ID number], I want to show a count for the [Company name] which is not blank.

Thanks.

1 Solution

Accepted Solutions
Taoufiq_Zarra

@Edvin  like ?

change measure to :

 

count({<[ID number]={"=count({<[Process]={'Done'},[Company name]=>} Process)>0"}>}  distinct [ID number])

 

output:

Capture.PNGCapture.PNGCapture.PNG

 

Regards,
Taoufiq ZARRA

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

(you can mark up to 3 "solutions") 😉

View solution in original post

5 Replies
Taoufiq_Zarra

@Edvin 

if I understood correctly, there is an error in the output FERIX should not be displayed

Capture.PNG

 

you can do for example :

as dimension and Supress when value is NULL

=if([Company name]<>'(blank)',[Company name])

 

and for expression :

count({<[ID number]={"=count({<[Process]={'Done'}>} Process)>0"}>}  distinct [ID number])

 

output:

Capture.PNG

Regards,
Taoufiq ZARRA

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

(you can mark up to 3 "solutions") 😉
Edvin
Creator
Creator
Author

@Taoufiq_Zarra  thanks!

But I have another question, when I filter a specific Company name, that expression just shows 0, when there is no filter presented, all values are correct. I think I understand why it works like that, so my question is, can I do it, that when I filter, it will show the same, as when no filter is chosen?

Taoufiq_Zarra

@Edvin  like ?

change measure to :

 

count({<[ID number]={"=count({<[Process]={'Done'},[Company name]=>} Process)>0"}>}  distinct [ID number])

 

output:

Capture.PNGCapture.PNGCapture.PNG

 

Regards,
Taoufiq ZARRA

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

(you can mark up to 3 "solutions") 😉
Taoufiq_Zarra

@Edvin  or if you want to keep the full chart :

change measure to

count({<[Company name]=,[ID number]={"=count({<[Process]={'Done'},[Company name]=>} Process)>0"}>}  distinct [ID number])

output:

Capture.PNGCapture.PNG

Regards,
Taoufiq ZARRA

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

(you can mark up to 3 "solutions") 😉
Edvin
Creator
Creator
Author

@Taoufiq_Zarra  really appreciate your help. Tried both expressions, but still in the table chart, when I choose a company name, the count() becomes 0.

 

EDIT: Found the problem why it didn't work, because the (blank) company where all the needed information is included, I made it null. Then I turned off "Include null values". Thanks!