Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count with three conditions

ATENCIONXUSUARIOEstado
User1Cerrado
User2Cerrado
User3Cerrado
User1Abierto
User2Cerrado

In the table you can see the example, we have the two columns, in this case i need to count the elements in 'ATENCIONXUSUARIO' column for User 1 and User 2, when the column 'Estado' is "Cerrado", according to the example the result must be 3.

How can i do that???

Best Regards

3 Replies
Not applicable
Author

Hi,

Try with this:

Count({< ATENCIONXUSUARIO={User1, User2} >} Estado)

If the result is different, try to include the DISTINCT Clause:

Count({< ATENCIONXUSUARIO={User1, User2} >} DISTINCT Estado)

Regards,

Ricardo

Not applicable
Author

Thanks for your answer.

With the expression that you suggest we can only count the items that contains User1 and User2 in the column ATENCIONXUSUARIO, but we cant filter to in the column "Estado" the word Cerrado.

How can i do that?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Try this.

    

Count({< ATENCIONXUSUARIO={User1, User2},Estado = {"Cerrado"} >} Estado)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!