Skip to main content
Announcements
New: No-code data prep in Qlik Cloud Analytics™ TAKE A TOUR
cancel
Showing results for 
Search instead for 
Did you mean: 
Krish2459_58
Creator
Creator

Data wild match

Hi,

I have two tables Rural table and CIty table.The tables were concatenated.

When we use Service Type as filter the simliar data is repeating even though it has same meaning due to format differnce.

Rural table concatenate City table

Rural table  
ID Service Type Flag
1 Atm_maintenance Rural
2 Ceiling Rural
3 Fire Systems Rural
City table    
ID Service Type Flag
11 Atm Maintenance City
22 Ceilings City
33 Fire_systems City

 

Final Filter required:

Current Service Type filter output required Final Filter
Atm_maintenance Atm Maintenance Atm Maintenance
Atm Maintenance Atm Maintenance Ceiling
Ceiling Ceiling Fire Systems
Ceilings Ceiling  
Fire Systems Fire Systems  
Fire_systems Fire Systems  
Labels (3)
3 Replies
Krish2459_58
Creator
Creator
Author

Hi, Any suggestions.

 

Thanks..

hanna_choi
Partner - Creator
Partner - Creator

Dear Krish2459_58

How about you try using applymap() function?

 

*** Script Sample

map_ST:
mapping Load
*
inline [
"Service Type", ServiceType
Atm_maintenance, Atm Maintenance
Ceiling, Ceiling
Fire Systems, Fire Systems
Atm Maintenance, Atm Maintenance
Ceilings, Ceiling
Fire_systems, Fire Systems
];

 

Final_Table:
Load
ID,
applymap('map_ST', [Service Type]) as [Service Type],
Flag
Resident Concatenate_Table

;

 

Thanks

 

anat
Master
Master

Recommend approach is to maintain consistent data in backend tables else use apply map function as mentioned by Hanna_Choi