Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
osaral
Contributor
Contributor

Is it possible to count different values on a field between 2 different states?

Hi,

Lets say my field is KEY, and states are State1 and State2.

KEY : A,B,C,D,E,F

{State 1} KEY: A,B,C,D,E

{State 2} KEY: A,B,C,F

Based on the selections done on state 1 and state 2 I need to count the different values on the field KEY between these 2 states in a single expression. In the given example the result should be 3 since D,E and F values are unique to the states. I wasn't able find a way to achieve this. Is it possible?

Labels (1)
2 Replies
Vegar
MVP
MVP

You could try to fetch the symmetric difference (XOR) between the two states using set analysis. It would look something like this:

count({state_1 / state_2} KEY)

osaral
Contributor
Contributor
Author

Thank you for the reply, but I am not getting what I wanted. Maybe i executed it wrong. I am expecting a result of 10 and getting the result shown below.  (left side filter pane and table are on state_1, right side filter pane and table are on state_2)

Capture.PNG