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

Why these two expressions do not give the same results

Hello everyone,
We are experiencing an odd problem using two expressions which in theory they should have to give us the same result.
Let's say that we have a table of transactions, which has a column names transaction_id and other named issue_completed which can be null, true or false.
All the transactions of these table have NULL to the issue_completed field.
Then the expressions:
COUNT(IF(issue_completed='true', transaction_id)) results in 0
COUNT({<issue_completed={'true'}}>}transaction_id) results in 22993 which is the number of transactions of the table.

Anyone could tell me why of these results?

Thanks in advance,
Ferran.
3 Replies
Not applicable
Author

Just a guess but I think it is because the first count is doing a count(Null()) which will be null. I think the set analysis returns a 0 for each row and you can still count 0 values.

Not applicable
Author

what you have if you do IF(issue_completed='true',COUNT(transaction_id),0)

Not applicable
Author

Antonio,
your expression results in 0 as well.

I know that there are many ways of doing the same but what keeps me puzzled is why they don't give the same result.

Thanks.
Ferran