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: 
xarapre7
Creator II
Creator II

Created a left join to get Svc Mgr Names but it's not linked to other tables.

Hi!  I'm trying to get the names of the Svc Mgrs from Employee table by getting the Svc Mgr ID from the Customer table and left joined it to the Employee table and I was able to get the Svc Mgrs names.  So that when I click on a Svc Mgr ID, it's giving me the corresponding Svc Mgr's name.  However, the other fields from other tables (calendar and transaction tables) are greyed out.  What should I do so that when I click on the Svc Mgr's name, it's also linked to the other tables?  Thank you for your help in advance

EMPLOYEE:
LOAD
       IF (NOT ISNULL(EmployeeID), EmployeeID,0) AS EmployeeID
      ,[LoginID]
      ,[FirstName]
      ,[LastName]    
FROM  $(vQVDPath)\Employee.qvd
(qvd);


//get the Svc Mgr ID from Customer table and join with EmployeeID from Employee table to get the Svc Mgr Names
left join (EMPLOYEE)
LOAD distinct 
      [Svc Mgr ID] as EmployeeID,
       1 as SMID_Filter     
FROM $(vQVDPath)\Customer.qvd
(qvd);

CUSTOMER:
LOAD
     Customer_ID,
     Name,
     City,
     [Zip Code]

FROM
$(vQVDPath)\Customer.qvd
(qvd);

14 Replies
Anil_Babu_Samineni

I haven't seen any field related [Svc Mgr ID] in EMPLOYEE table

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
xarapre7
Creator II
Creator II
Author

Sorry.... Customer Table has the field [Svc Mgr ID] which joins to the EmployeeID of the Employee Table.  That's how they are associated.

Anil_Babu_Samineni

Ok, Try this?

EMPLOYEE:
LOAD
      IF (NOT ISNULL(EmployeeID), EmployeeID,0) AS EmployeeID
      ,[LoginID]
      ,[FirstName]
      ,[LastName]   
FROM  $(vQVDPath)\Employee.qvd (qvd);

CUSTOMER:
LOAD
    Customer_ID,
    Name,
    City,
    [Zip Code]

FROM
$(vQVDPath)\Customer.qvd (qvd);

left join (EMPLOYEE)
LOAD distinct 
      [Svc Mgr ID],

      ApplyMap('EMPLOYEE',EmployeeID) as EmployeeID,

     //ApplyMap('EMPLOYEE',[Svc Mgr ID],EmployeeID) as EmployeeID,
      1 as SMID_Filter     
Resident CUSTOMER;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
prma7799
Master III
Master III

Then write this



left join (EMPLOYEE)

CUSTOMER:
LOAD

     [Svc Mgr ID] as EmployeeID
     Customer_ID,
     Name,
     City,
     [Zip Code]

FROM
$(vQVDPath)\Customer.qvd
(qvd);

xarapre7
Creator II
Creator II
Author

I'm getting an error.

where is the mapping?

xarapre7
Creator II
Creator II
Author

There's an error.

Syntax error, missing/misplaced FROM:

left join (EMPLOYEE)

CUSTOMER:

prma7799
Master III
Master III

Try this Or please share some demo qvw file

left join (EMPLOYEE)

LOAD
    Customer_ID,
    Name,
    City,
    [Zip Code]

FROM
$(vQVDPath)\Customer.qvd (qvd);

xarapre7
Creator II
Creator II
Author

Here is the file for your reference.  Please help.

Thanks.

prma7799
Master III
Master III

Please check..