Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
andreyfcdk91
New Contributor III

Joining tables with dublicate values

Good day!

In my model i load two tables:

Main:

LOAD

*

FROM

Example.xlsx

(ooxml, embedded labels, table is Sheet1)

;

Left join(Main)

load

*

from

Example.xlsx

(ooxml, embedded labels, table is Sheet2)

;

But in second table there more than one value for every (or some) Nomenclature_Id.

I need to join  value from first rows for field Name;

Necessary result:

Nomenclature_IdName
211Name1
234Name1
454Name1
456Name1
3 Replies
Not applicable

Re: Joining tables with dublicate values

Use mapping load,

PFA

Re: Joining tables with dublicate values

This is the script ypoi need

load
Nomenclature_Id, FirstValue(Name) as Name
from
Example.xlsx
(
ooxml, embedded labels, table is Sheet2)
Group By Nomenclature_Id;

Re: Joining tables with dublicate values

Have a look at this post Don't join - use Applymap instead

Name_Map:
mapping load
     Nomenclature_Id, Name
from
Example.xlsx
(
ooxml, embedded labels, table is Sheet2)
;

Data:

LOAD
   Nomenclature_Id,

     applymap('Name_Map', Nomenclature_Id) as Name

from
Example.xlsx
(
ooxml, embedded labels, table is Sheet1)
;

Community Browser