Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Count if condition

Hello,

I'm trying to count different rows in a database where a field's value is different from 1.

For example, a quote can have 6 different values from 0 to 6 (accpeted, refused, pending, etc) and I need to count the amount of quotes that are not accpeted, that is to say, they can be pending, refused, ...

I already succeeded counting the amount of quotes that are refused, using:

count ({<ENDV_NVARIANT={0}>} ENDV_NVARIANT) which works perfectly,

but when I replace the "=" by "<>" in order to have a condition where it has to be different from "1", it doesn't work since the symbols are interfering.

count ({<ENDV_NVARIANT<>{1}>} ENDV_NVARIANT)

Is there another way to do this?

Thanks a lot!

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

count ({<ENDV_NVARIANT -= {1}>} ENDV_NVARIANT)

View solution in original post

4 Replies
MK_QSL
MVP
MVP

count ({<ENDV_NVARIANT -= {1}>} ENDV_NVARIANT)

Not applicable
Author

When I introduce your expression, it tells me there is an error 😕

Not applicable
Author

On the other side, the other expression:

Count({<ENDV_STATUT_DE_SUIVI = {"<>1"}>} ENDV_STATUT_DE_SUIVI)    (the variables are the same, sorry for the change)

seemed to work, but it doesn't take into accoun the quotes with value "0"

MK_QSL
MVP
MVP

When we use -= in Set Analysis, it will give you syntax error (Red Lines) but the formula will work..

Just ignore the syntax error while using -=