Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Susan_DS
Partner - Contributor III
Partner - Contributor III

Non-matching values

Greetings!

I have two data sources (tables A and B) that both use two concatenated fields as serial numbers.

All of the serial numbers in Table A are scheduled to flow into  Table B in an ongoing process. My task is to be able to show which serial numbers from Table A are not yet available in Table B.

How can I instruct Qlik Sense to show this information using a chart expression? I have attempted this using the if match statement below, but it is showing an error message:

if(match(FieldName1) and match(FieldName2), 'True', 'False')

Thanks!

1 Solution

Accepted Solutions
Kushal_Chawda

You need to take FieldA in dimension and then use below expression

=concat({<FieldA-={"=Count({<FieldA=p(FieldB)>}FieldA)"}>}FieldA)

Where FieldA is field from table A and FieldB is field from Table B which you want to compare

View solution in original post

9 Replies
Kushal_Chawda

try

if(exists(FieldName1,FieldName2), 'True', 'False')

Susan_DS
Partner - Contributor III
Partner - Contributor III
Author

Hi, Kush, thanks for your feedback. I tried that in my chart expression and unfortunately, "exists" can only be used in a Load script; it throws an error in a chart.

Is there a way to do this using a chart expression?

Thanks!

Kushal_Chawda

are the both table connected? What exactly you want to display and in which chart?

Susan_DS
Partner - Contributor III
Partner - Contributor III
Author

I'm pulling data from both sources, and would like to display a list of the values in Table A that do not appear in Table B. 

Since the list may range from 5 to 500 values, I would like to display it in a table chart.

Thanks!

Kushal_Chawda

try this

=concat({<FieldA-={"=Count({<FieldA=p(FieldB)>}TableA)"}>}FieldA)
Susan_DS
Partner - Contributor III
Partner - Contributor III
Author

Hi, Kush, I've tried this expression as a measure in a table chart and Qlik is showing an error message: "error in set modifier expression."

Any suggestions on how to fix? 

Kushal_Chawda

You can ignore. It should work

Kushal_Chawda

You need to take FieldA in dimension and then use below expression

=concat({<FieldA-={"=Count({<FieldA=p(FieldB)>}FieldA)"}>}FieldA)

Where FieldA is field from table A and FieldB is field from Table B which you want to compare

Susan_DS
Partner - Contributor III
Partner - Contributor III
Author

Thanks, Kush! I used your approach on a mocked-up data set to verify that this method works. It turns out the reason it wasn't working in the app originally was due to a column being renamed elsewhere in the script. Now that I have resolved that issue, your solution works.

Thank you for your help!