Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
alvrodrigues
Creator
Creator

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) )

View solution in original post

alvrodrigues
Creator
Creator
Author

Worked well. Thanks !