Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Count IF equal to Text

I am attempting to make a stacked bar chart, but I am having difficulty in appropriately doing a Count IF. The two Count IFs I need to do are Count IF = 'Pass' and Count IF = 'Fail'.

If I understand correctly Qlik does not support the COUNTIF function, but I still can not seem to get the syntax correct to get the appropriate answer

1 Solution

Accepted Solutions

Re: Count IF equal to Text

Try

=count({<Your Dimension={'Fail'}>} Your Dimension)

=count({<Your Dimension={'Pass'}>} Your Dimension)


or for both


=count({<Your Dimension={'Pass','Fail'}>} Your Dimension)

3 Replies
mwoolf
Honored Contributor II

Re: Count IF equal to Text

You didn't say what you wanted to count or the field name containing the Pass/Fail text.. Try:

count({$<YourPassFailField = {'Pass'}>} FieldToCount)

count({$<YourPassFailField = {'Fail'}>} FieldToCount)

Re: Count IF equal to Text

Try

=count({<Your Dimension={'Fail'}>} Your Dimension)

=count({<Your Dimension={'Pass'}>} Your Dimension)


or for both


=count({<Your Dimension={'Pass','Fail'}>} Your Dimension)

Not applicable

Re: Count IF equal to Text

Oh that was not my expression in the original post merely my thought process. I simply want to count the number of 'Pass' and 'Fail' separately to create a stacked bar chart.

I apologize for my poor explanation.

Community Browser