
Contributor II
2019-10-27
05:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Applymap + substring in QlikSense
Hello Guys,
I'm trying to do something similar to a "mapping" with "substring". my goal is to identify if in a source table one of the fields contains a substring and, if so, map it with another field from another table.
I leave a small example after the source data, the desired result and what I have tried to do so far:
1/ data table
2/ map table
3/ expected result
4/ attempt made
concepts:
mapping LOAD
"Whole Concept",
"Simplified Concept"
FROM [lib://escritorio/concepts.xlsx]
(ooxml, embedded labels, table is Hoja1);
expenses:
LOAD
MapSubString('concepts', "Whole Concept") as Simplified,
"Whole Concept",
Amount
FROM [lib://escritorio/expenses.xlsx]
(ooxml, embedded labels, table is Hoja1);
- Tags:
- sense
1,139 Views
2 Replies

Creator III
2019-10-27
07:59 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Concepts:
MAPPING LOAD
Lower("Whole Concept"),
'<' & "Simplified Concept" & '>'
FROM [lib://escritorio/concepts.xlsx]
(ooxml, embedded labels, table is Hoja1);
Expenses:
NOCONCATENATE
LOAD
TextBetween(
MapSubString('Concepts', Lower("Whole Concept")),
'<', '>') AS Simplified,
"Whole Concept",
Amount
FROM [lib://escritorio/expenses.xlsx]
(ooxml, embedded labels, table is Hoja1);
1,110 Views

MVP
2019-10-28
03:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can do this by using a pick wildmatch approach.
Load
[Whole Concept],
Pick(Wildmatch([Whole Concept], '*restaurant*','*supermarket*'), 'Restaurant','Supermarket') as [Simplified Concept],
Amount
From Data;
Check out @rwunderlich blog on the topic https://qlikviewcookbook.com/2008/10/the-match-function/
Vegar
Qlik Community MVP
Qlik Community MVP
1,096 Views
