Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QV Script - Creating a "Unique" field using multiple fields from multiple existing tables

Hi All,

Am trying to create a unique field, which is derived from fields that are initially found in multiple tables. My syntax is as follows:

--------------------------------------------------------------------

RSTable:
Load Euros as SpendEuros,
SupplierID as SupplierIDvRS,
MatDescID
RESIDENT Purchases;

left join (RSTable)
Load MatDescID,
Family as RSFamily
Resident Materials;


(Family & '-' & SupplierID) as Unique

--------------------------------------------------------------------

The script above works fine, up until the "Unique" definition (last line of script above).

Looking at previous examples from the Developer 1 course, typically an "SQL Select *" statement and "From" are included, following this - although unsure if its relevant here / can't get it to work...?

Any ideas as to where I am going wrong?

Please advise,

Kind regards,

Rich

1 Reply
Miguel_Angel_Baeyens

Hello Rich,

Just a question of syntax:

FamilySupplierMap:MAPPING LOAD MatDescID, SupplierIDRESIDENT Purchases; STable:Load Euros as SpendEuros,SupplierID as SupplierIDvRS, MatDescIDRESIDENT Purchases; left join (RSTable)Load MatDescID,Family as RSFamily,(Family & '-' & ApplyMap('FamilySupplierMap', MatDescID)) as UniqueResident Materials;


Hope that helps