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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Conditional count in Bar chart

NameEnglish GradeMath Grade
LilyAB
LucyAA
GraceBC
JackDA
MayAA
GigiBA

Hi I have a table show above. And I would like to show the data in a bar chart that

(if([English Grade]='A' and '[Math Grade]'='A', count(Name))

But I just type the above expression, the chart shows nothing. What should I modify in the expression that I could get the number I want?

Thanks so much!

1 Solution

Accepted Solutions
maxgro
MVP
MVP

in bar chart

dimension          Name

expression          count(if([English Grade]='A' and [Math Grade]='A', Name))

View solution in original post

4 Replies
maxgro
MVP
MVP

in bar chart

dimension          Name

expression          count(if([English Grade]='A' and [Math Grade]='A', Name))

ferha_jafri
Partner - Creator III
Partner - Creator III

Try this,


(if([English Grade]='A' and '[Math Grade]'='A', substringcount(Name,Name))

Not applicable
Author

Yes! It looks good now. Thanks so much!

PradeepReddy
Specialist II
Specialist II

we can achieve this using set analysis also...

count({$<[English Grade]={'A'},[Math Grade]={'A'}>}Name)