Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Find value from Substring.

Hi

I have this table that I read in to QlickView from Excel:

TABLE 1

ItemNameItemNumber
CFC-B1-305x305x80-1001111
CFC-B1-457x457x80-2002222

And this from another Excel sheet:

TABLE 2

ID

Value

0305x305x80
1

457x457x80

From table1  Itemname i need to extract part of the value and find a match in table 2 field VALUE and get the ID that I need to use in a tableObject I create later in the result screen where I create a string with the ID i find like this:

ItemNameItemNumberstring
CFC-B1-305x305x80-1001111filterdimension=0
CFC-B1-457x457x80-2002222filterdimension=1

I have this in the load:

// Translation file CFC

table1:

LOAD id,

     value

FROM

(ooxml, embedded labels, table is cfc_filt_dimen);

Table2:

//---- CFC-----

LOAD 'CFC' as product,

     fam,

     itemName,

     m3ItemNumber

FROM

(ooxml, embedded labels, table is itemNumber);

Please help

Regards

Göran

2 Replies
Not applicable
Author

Hi

I added one more line but the result is wrong. The first row get correct value, but every other get the same as the first row.

// Translation file CFC

table1:

LOAD id,

    value

FROM

(ooxml, embedded labels, table is cfc_filt_dimen);

Concatenate

Table2:

//--------------------------

//---- CFC-----

LOAD 'CFC' as product,

    fam,

    itemName,

NEW LINE---->    exists(id, SubField(itemName, '-', 3)) as Newfield,

    m3ItemNumber

FROM

(ooxml, embedded labels, table is itemNumber);

LOAD attributeId,

    attributeDescription,

    attributeValues,

    externalAttributeValues

FROM

(ooxml, embedded labels, table is productAttributes);

//END ----------CFC------

sunny_talwar

May be this:

MappingTable:

Mapping

LOAD Value,

  '/' & ID & '\'

FROM

[https://community.qlik.com/thread/239032]

(html, codepage is 1252, embedded labels, table is @2);

Table:

LOAD ItemName,

    ItemNumber,

    'filterdimension=' & TextBetween(MapSubString('MappingTable', ItemName), '/', '\') as String

FROM

[https://community.qlik.com/thread/239032]

(html, codepage is 1252, embedded labels, table is @1);

Capture.PNG