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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Help Creating Salesperson from 2 Tables

I have EmployeeID in my facts table and the employee dimensions table.  Employee name is in the dimensions table.  I want to be able to show both the employee names as well as the salespeople (just those associated to orders/opportunities in the facts table) .  This would be very simple if I had the actual employee names in the facts table. 

How do I get the employee names in the facts table while preserving a field for all employees?

6 Replies
MK_QSL
MVP
MVP

Employee:

Mapping Load EmployeeID, EmployeeName From EmployeeTable;

FactTable:
Load

     Field1,

     Field2,

     Applymap('Employee',EmployeeID,'Unknown') as EmployeeName,

     Field3,.....

From FactTableName;

===================================

Or

FactTable:

Load * From FactTableName;

Left Join

Load * From EmployeeTableName;


shambhub
Creator
Creator

David,

   Please can you explain me your question with example ? So that I can look into .

Not applicable
Author

Facts Table:

Opportunities:

LOAD "Oppo_PrimaryCompanyId" as CompanyID,

    "Oppo_AssignedUserId" as EmployeeID,

    "Oppo_Description",

    "Oppo_Type",

    "Oppo_Product" as Product,

...

Dimension table:

Employees:

LOAD "User_UserId" as "EmployeeID",

//    "User_LastName",

//    "User_FirstName",

    "User_FirstName" & ' ' & "User_LastName" as "Employee Name";

...

I need a field that shows only users associated with at least 1 Opportunity (AKA Salespeople).

Thoughts?

MK_QSL
MVP
MVP

Opportunities:

LOAD "Oppo_PrimaryCompanyId" as CompanyID,

    "Oppo_AssignedUserId" as EmployeeID,

    "Oppo_Description",

    "Oppo_Type",

    "Oppo_Product" as Product,

Left Join

Employees:

LOAD "User_UserId" as "EmployeeID",

    "User_FirstName" & ' ' & "User_LastName" as "Employee Name";

Not applicable
Author

Thanks for the reply, Manish.

I need a separate field that contains ONLY salespeople, as well as a field that contains all employees.  A left join does not offer that.

MK_QSL
MVP
MVP

Can you elaborate little more please?