Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
Creator II
Creator II

Combine values from two different Fields

I have two Fields- BRANCH and LOCAL in two different tables

TableA:

BRANCH
ACCOUNTS
HR
LEGAL
IT
SERVICES
TRAVEL
SUPPLY

 

TableB:

LOCAL
SALES
CORPORATE
MARKETING
EVENTS
MAINTENANCE
MEDICAL
PUBLICITY

 

I need to create a new combined Field with all the combinations of the values from the two fields

Combined Field:

ACCOUNTS_SALES
ACCOUNTS_CORPORATE
ACCOUNTS_MARKETING
ACCOUNTS_EVENTS
ACCOUNTS_MAINTENANCE
ACCOUNTS_MEDICAL
ACCOUNTS_PUBLICITY
.
.
.
.
.
.
SUPPLY_SALES
SUPPLY_CORPORATE
SUPPLY_MARKETING
SUPPLY_EVENTS
SUPPLY_SUPPLY
SUPPLY_MEDICAL
SUPPLY_PUBLICITY

 

Whenever a user selects ACCOUNTS_SALES in the Combined Field, it should select 'ACCOUNTS' in BRANCH and 'SALES' in LOCAL. Similarly, selecting  SUPPLY_PUBLICITY should select 'SUPPLY' in BRANCH and 'PUBLICITY' in LOCAL fields.

Labels (2)
1 Solution

Accepted Solutions
saran7de
Master
Master

Try this.

BRANCH:
LOAD * INLINE [
	BRANCH
    ACCOUNTS
    HR
    LEGAL
    IT
    SERVICES
    TRAVEL
    SUPPLY
];

Outer Join(BRANCH)
LOCAL:
LOAD * INLINE [
    LOCAL
    SALES
    CORPORATE
    MARKETING
    EVENTS
    MAINTENANCE
    MEDICAL
    PUBLICITY
];

Combined:
NoConcatenate
LOAD BRANCH, LOCAL, BRANCH&'_'&LOCAL As [Combined Field]
Resident BRANCH;

Drop Table BRANCH;

commQV57.PNG

View solution in original post

1 Reply
saran7de
Master
Master

Try this.

BRANCH:
LOAD * INLINE [
	BRANCH
    ACCOUNTS
    HR
    LEGAL
    IT
    SERVICES
    TRAVEL
    SUPPLY
];

Outer Join(BRANCH)
LOCAL:
LOAD * INLINE [
    LOCAL
    SALES
    CORPORATE
    MARKETING
    EVENTS
    MAINTENANCE
    MEDICAL
    PUBLICITY
];

Combined:
NoConcatenate
LOAD BRANCH, LOCAL, BRANCH&'_'&LOCAL As [Combined Field]
Resident BRANCH;

Drop Table BRANCH;

commQV57.PNG

View solution in original post