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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Mapping with like

Good morning,

I've a question about the data reload in Qlikview.

I've one data table like this, where there are 2 coloumns "Cod.Modello" and "Descrizione"

  

Cod.modelloDescrizione
8XFB14A1 SB 1.6 TDI SPORT
8XFCJCA1 SB 1.4 TFSI DESIGN
8XFCJGA1 SB 1.4 TFSI S-TR DESIGN
8XKAT4A1 1.0 TFSI
8XKA1GA1 1.6 TDI S-TR
8XKA14A1 1.6 TDI
8VEARGA3 CB 2.0 TDI S-TR.
8VEAR9A3 CB 2.0 TDI Q.
8VEATCA3 CB 2.0 TDI
8VFAGYA3 SB 2.0 TFSI Q.S-TR.
8VFANCA3 SB 1.0 TFSI
8VFANGA3 SB 1.0 TFSI S-TR.
8VMAZGA3 SEDAN 1.5 TFSI S-TR.
8VMBDCA3 SEDAN 1.6 TDI SPORT
8VMBDGA3 SEDAN 1.6 TDI S-TR.SPORT
8VMBGCA3 SEDAN 2.0 TFSI SPORT

I've a second table where there are 2 coloumns "SIGLA" and "%"

 

SIGLA%
8XK10
8XF10
8VF10,5
8VM12
8VE10,5

And so the question: Can I've a new table with the merge of this two table like that using the reaload script in Qlikview?

   

Cod.modelloDescrizione%
8XFB14A1 SB 1.6 TDI SPORT10
8XFCJCA1 SB 1.4 TFSI DESIGN10
8XFCJGA1 SB 1.4 TFSI S-TR DESIGN10
8XKAT4A1 1.0 TFSI10
8XKA1GA1 1.6 TDI S-TR10
8XKA14A1 1.6 TDI10
8VEARGA3 CB 2.0 TDI S-TR.10,5
8VEAR9A3 CB 2.0 TDI Q.10,5
8VEATCA3 CB 2.0 TDI10,5
8VFAGYA3 SB 2.0 TFSI Q.S-TR.10,5
8VFANCA3 SB 1.0 TFSI10,5
8VFANGA3 SB 1.0 TFSI S-TR.10,5
8VMAZGA3 SEDAN 1.5 TFSI S-TR.12
8VMBDCA3 SEDAN 1.6 TDI SPORT12
8VMBDGA3 SEDAN 1.6 TDI S-TR.SPORT12
8VMBGCA3 SEDAN 2.0 TFSI SPORT12

Thankyou.

Nicola

5 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Something like this:

MyMappingTable:

MAPPING LOAD

     SIGLA,

     %

FROM

     ...sigla_source..

     ;

MyTable

LOAD    

     "Cod.Modello",

      "Descrizione"

     ApplyMap('MyMappingTable',Left("Cod.Modello",3),0)  as %

FROM

     ...source...

     ;



talk is cheap, supply exceeds demand
sasiparupudi1
Master III
Master III

Map_SIGLA:

Mapping Load * Inline

[

SIGLA|%

8XK|10

8XF|10

8VF|10,5

8VM|12

8VE|10,5

](delimiter is '|');



T1:



Load

Cod.modello,Descrizione,

ApplyMap('Map_SIGLA',LEFT([Cod.modello],3),'NA') As %

Inline

[


Cod.modello,Descrizione

8XFB14,A1 SB 1.6 TDI SPORT

8XFCJC,A1 SB 1.4 TFSI DESIGN

8XFCJG,A1 SB 1.4 TFSI S-TR DESIGN

8XKAT4,A1 1.0 TFSI

8XKA1G,A1 1.6 TDI S-TR

8XKA14,A1 1.6 TDI

8VEARG,A3 CB 2.0 TDI S-TR.

8VEAR9,A3 CB 2.0 TDI Q.

8VEATC,A3 CB 2.0 TDI

8VFAGY,A3 SB 2.0 TFSI Q.S-TR.

8VFANC,A3 SB 1.0 TFSI

8VFANG,A3 SB 1.0 TFSI S-TR.

8VMAZG,A3 SEDAN 1.5 TFSI S-TR.

8VMBDC,A3 SEDAN 1.6 TDI SPORT

8VMBDG,A3 SEDAN 1.6 TDI S-TR.SPORT

8VMBGC,A3 SEDAN 2.0 TFSI SPORT


];

sasiparupudi1
Master III
Master III

Did you manage to get this working?

Anonymous
Not applicable
Author

Thanks to both,

but I would also have another question about it. in the example I had not indicated that the field      Cod.Modello" have a different number of characters, such as:

SIGLA%
8X10
8VF10,5
8VMA12
8VMB10,5

Thankyou.

best regards.

Nicola

Anonymous
Not applicable
Author

Thanks all,

I found this question which is right for me.

http://qlikviewcookbook.com/recipes/download-info/mapping-with-wildcards/

I've tested it and it works correctly.


Best regards.

Nicola