Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Rodriguez22
Contributor II
Contributor II

Getting values based on a string match in another table

Hi everyone,

I have a table with customers and multiple phone numbers:

Customer Phone numbers
Jhon Smith 65214898 - 67845123 - 62315489 - 65421387
Marco Perez 69784951 - 69875123 - 69954871

 

I have another table with information of a call center (phone number and duration)

Number Duration
67845123 00:02:32
65214898 00:01:20
69954871 00:04:11

 

I need to know the customers'name in the second table, for example:

Number Duration Customer name

67845123

00:02:32 Jhon Smith
65214898 00:01:20 Jhon Smith
69954871 00:04:11 Marco Perez

 

I have tried with TextBetween and MapSubString but don't work.

Any help with this is highly appreciated. 

Thanks!

Labels (1)
1 Solution

Accepted Solutions
MarcoWedel
MVP
MVP

maybe like this?

 

MarcoWedel_0-1663268680233.png

 

mapCustomers:
Mapping
LOAD SubField([Phone numbers],' - '),
     Customer
Inline [
Customer, Phone numbers
Jhon Smith, 65214898 - 67845123 - 62315489 - 65421387
Marco Perez, 69784951 - 69875123 - 69954871
];


tabCallCenterInfo:
LOAD Number,
     Interval(Duration,'hh:mm:ss') as Duration,
     ApplyMap('mapCustomers',Number) as [Customer name]
Inline [
Number,	Duration
67845123, 00:02:32
65214898, 00:01:20
69954871, 00:04:11
];

 

View solution in original post

2 Replies
MarcoWedel
MVP
MVP

maybe like this?

 

MarcoWedel_0-1663268680233.png

 

mapCustomers:
Mapping
LOAD SubField([Phone numbers],' - '),
     Customer
Inline [
Customer, Phone numbers
Jhon Smith, 65214898 - 67845123 - 62315489 - 65421387
Marco Perez, 69784951 - 69875123 - 69954871
];


tabCallCenterInfo:
LOAD Number,
     Interval(Duration,'hh:mm:ss') as Duration,
     ApplyMap('mapCustomers',Number) as [Customer name]
Inline [
Number,	Duration
67845123, 00:02:32
65214898, 00:01:20
69954871, 00:04:11
];

 

Rodriguez22
Contributor II
Contributor II
Author

It works!!!!! 

Thank you very much