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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to use where clause in count?

Hi,

   I am trying to create a text box with an expression where it does a count on Winning_Team with a Where clause.  

For example, i want to do a count where the [Total_Team] = [Winning_Team] .How to do this?

Labels (2)
4 Replies
MK_QSL
MVP
MVP

=COUNT({<[Winning_Team] = {"=[Winning_Team]=[Total_Team]"}>}[Winning_Team])

swuehl
MVP
MVP

You can use conditional aggregations on a record base like this:

=Count( If( [Total_Team] = [Winning_Team], [Winning_Team]))

You can also use set analysis, but here you need to carefully identify a field to select on when you want to make 'per field group base' comparisons. If Winning_Team shows multiple records, the comparison Winning_Team = Total_Team could show distinct responses, so won't qualify for an expression search.

Conditional Aggregations

edit: and please carefully select a proper place to post your questions, QlikBug is a place to discuss issues in the software that are confirmed or assumed defects, not how to use the software in general (there are other places like 'new to QlikView / QlikSense'

Not applicable
Author

Does it work for Not equal to operator?

swuehl
MVP
MVP

Like this?

=Count( If( [Total_Team] <> [Winning_Team], [Winning_Team]))