Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Conditional COUNT in an expression

I need a variable with a value that comes from a counter that requires a simple condition. Please help me to create this expression.

The condition is if a specific table field (X) is  <= 8. If yes, the expression most count distinct an other field  (Y).

In SQL it will be like

          select COUNT(Y) from TABLE where X <=8

1 Solution

Accepted Solutions
swuehl
MVP
MVP

I assume you want to use that expression in the front end, right?

Try in a chart object this as expression:

=count(distinct if( X <= 8, Y) )

View solution in original post

2 Replies
swuehl
MVP
MVP

I assume you want to use that expression in the front end, right?

Try in a chart object this as expression:

=count(distinct if( X <= 8, Y) )

Anonymous
Not applicable
Author

Worked well. Thanks !