Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld starts MONDAY! last chance to register is now ! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
alina_qlik
Contributor III
Contributor III

How to join-merge data for a specific view ?

Hello there ,

With my limited knowledge on joins tried code below , but in vain . 

QUERY:
LOAD * INLINE [

ID, LOC, Perks(M), Outage
A1, MICHIGAN, 2, 0.2
A1, BAY, 3, 0.5
2B, MICHIGAN, 4, 0.4
2B, DETROIT, 5, 0.01
2B, OHIO, 6, 0.9
3O, FL, 8, 0.7
];

Outer Join (QUERY)
LOAD
Distinct
LOC
Resident QUERY ;

Not getting table structure below (which is needed)  :

IDLOCPerks(M)Outage
A1BAY30.5
A1MICHIGAN20.2
A1DETROITNULLNULL
A1OHIONULLNULL
A1FLNULLNULL
2BBAYNULLNULL
2BMICHIGAN40.4
2BDETROIT50.01
2BOHIO60.9
2BFLNULLNULL
3OBAYNULLNULL
3OMICHIGANNULLNULL
3ODETROITNULLNULL
3OOHIONULLNULL
3OFL80.7

 

Thank you fellas  

1 Solution

Accepted Solutions
Kush
MVP
MVP

try below

QUERY:
LOAD * INLINE [
ID, LOC, Perks(M), Outage
A1, MICHIGAN, 2, 0.2
A1, BAY, 3, 0.5
2B, MICHIGAN, 4, 0.4
2B, DETROIT, 5, 0.01
2B, OHIO, 6, 0.9
3O, FL, 8, 0.7
];

New:
LOAD Distinct ID
Resident QUERY;

Join(New)
LOAD Distinct LOC
Resident QUERY;

Join(QUERY)
LOAD *
Resident New;

DROP Table New;

 

View solution in original post

1 Reply
Kush
MVP
MVP

try below

QUERY:
LOAD * INLINE [
ID, LOC, Perks(M), Outage
A1, MICHIGAN, 2, 0.2
A1, BAY, 3, 0.5
2B, MICHIGAN, 4, 0.4
2B, DETROIT, 5, 0.01
2B, OHIO, 6, 0.9
3O, FL, 8, 0.7
];

New:
LOAD Distinct ID
Resident QUERY;

Join(New)
LOAD Distinct LOC
Resident QUERY;

Join(QUERY)
LOAD *
Resident New;

DROP Table New;

 

View solution in original post