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

Count question

Dear specialists

I need to count the amout of this the stoke of a product in database 1 is different then in database 2.

I got all the data right now like:

Product         LocationA         LocationB
0001                    1                         1

0002                    2                         1

0003                    2                         2

0004                    1                         3

0005                    0                         1

I need a calculation that counts the times that LocationA <> LocationB, in this case the outcome should be 3

Any suggestions?

Thanks.

1 Solution

Accepted Solutions
Not applicable
Author

Hi,

Try     Sum(if(LocationA <> LocationB, 1, 0) )

View solution in original post

3 Replies
Not applicable
Author

Hi,

Try     Sum(if(LocationA <> LocationB, 1, 0) )

Not applicable
Author

a.medina's method works.

Please see attached document. I also did this another way by loading  a new column name and just differentiating between the 2 conditions

Cheers,

Byron

Anonymous
Not applicable
Author

Thanks and Thanks, that was what I needed.