Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
nina_jensen
Contributor III
Contributor III

How to combine field values from two fields and then select specific values

Hi 🙂

I have two tables - Code1 and Code2.

I have made a Filter Pane with Code1 as dimension and I want to show only higlighted blue codes from table Code1 and Code2 in the filter pane for Code1.

Whenever code XX appears in table Code1 it shall be replaced with Code2, but not all - only specific codes are to be shown in Code1.


I have managed to get XX replaced in Code1 with (not sure if this is the correct way to do it, but the codes were replaced).


if(code1='XX', [code2], code1)


But from here I am not able to find the right expression as I am not too familiar with expressions or set analyse.


Code1Code2
ABDE
ABDF
ADAB
CDAC
XXAB
XXAB
XXCD

Wanted result in Filter Pane for Code1

Code1
AB
AB
AD
AB
AB

I am using Qlik Sense Server, v3.x

9 Replies
rupamjyotidas
Specialist
Specialist

Is it always 'XX' getting replaced with 'AB'

Then

if(code1='XX', 'AB', code1) as code1

rupamjyotidas
Specialist
Specialist

if(code1='XX', 'AB',if(wildmatch( code1,'A')>0,code1)) as code1

rupamjyotidas
Specialist
Specialist

oops forgot the'*', i need to close the lappy i guess:-)

if(code1='XX', 'AB',if(wildmatch( code1,'A*')>0,code1)) as code1

nina_jensen
Contributor III
Contributor III
Author

Thank you for your answer.

It is not always replaced with AB - have 12 different values and need to name them specific.

The code XX have 12 possible codes that shall be replaced from table Code2 to table Code1 and about 80 codes that shall not be replaced.

nina_jensen
Contributor III
Contributor III
Author

OK, that looks like a possible solution.

I'll give that a try.

Thank you again Rupam DAS

rupamjyotidas
Specialist
Specialist

if it works, probably best to  close the discussion by marking 'correct answer' 🙂

nina_jensen
Contributor III
Contributor III
Author

I will as soon as I have checked it out  😉

nina_jensen
Contributor III
Contributor III
Author

The mapping did not solve the problem as I have too much variables.

I was able to solve it by using an expression on the filterpane and adding a bookmark.