Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
miro_kopecky
Contributor III
Contributor III

Compare two tables, if not then colour red

Hi, I have this task...

I have 2 tables: Word and words_frequency_1.Word as you can see in picture.
I need to compare words from table Word with words in table words_frequency_1.Word and those words which are not in words_frequency_1.Word should be shaded in table Words with red colour.
I dont have enough practice with coding in Qlik Sense so I am writing for help.

Thanks in advance.
Untitled.png

2 Replies
dplr-rn
Partner - Master III
Partner - Master III

See below an approach

Mark the matched values in load script with a flag and use background color expression e.g. if(Matched,green(),red()). result and scrip below

Capture.PNG

in your load script

Word_1:

load * inline [

Word

ab

bb

cc

dd

aa

mm

];

Word_2:

load * inline [

Word_2

ab

bs

cs

ds

aa

mm

];

//Load only matched values into temp table

Word_comp_temp:

left keep(Word_1)

load Word_2 as Word

Resident Word_2;

/Mark matched values in table 2

Left Join(Word_2)

load Word as Word_2, 1 as Matched

resident Word_comp_temp;

//drop temp table

drop table Word_comp_temp;

miro_kopecky
Contributor III
Contributor III
Author

Thank you:)
Do you have any idea how could i do another column where will be counted how many times was the word repeated?