Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Solved

Solved

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi,

May be like this..

T1:

LOAD * INLINE [

    DOC_NUM, DOC_YEAR, ACTIVITY, CENTER, STATUS, REGION

    1, 2013, 1, 100, C, NORTH

    1, 2014, 10, -, O, NORTH

    2, 2015, 500, 200, F, SOUTH

    3, 2013, 30, -, C, EAST

    4, 2014, 10, 300, O, WEST

    5, 2015, 1, -, W, WEST

];

Left Join(T1)

LOAD DOC_NUM, DOC_YEAR, ACTIVITY, CENTER as CENTER1;

LOAD * INLINE [

      DOC_NUM, DOC_YEAR, ACTIVITY, CENTER

    1, 2014, 10, 50

    3, 2013, 30, 150

    5, 2015, 1, 300

] ;

NoConcatenate

T2:

Load DOC_NUM,

  DOC_YEAR,

  ACTIVITY,

  if(CENTER='-',CENTER1,CENTER) as CENTER,

  STATUS,

  REGION Resident T1 ;

DROP Table T1;

View solution in original post

6 Replies
karthikeyan1504
Creator III
Creator III

Hi,

you can follow the below method via script,

Main_Values:

Load *

from Main_Values where not isnull(center);

Concatenate(Main_Values)

Load *

from Additional_Values;

Hope this helps!!!

Warm Regards,

Karthikeyan.

microwin88x
Creator III
Creator III
Author

Thanks, but with that option I get the following:

DOC_NUMDOC_YEARACTIVITYCENTERSTATUSREGION
001201300001100CNORTH
002201500500200FSOUTH
004201400010300OWEST
00120140001050--
003201300030150--
005201500001300--

Instead of:

DOC_NUMDOC_YEARACTIVITYCENTERSTATUSREGION
001201300001100CNORTH
00120140001050ONORTH
002201500500200FSOUTH
003201300030150CEAST
004201400010300OWEST
005201500001300WWEST
karthikeyan1504
Creator III
Creator III

Could you please let me know the relation/link between status, region & Doc_Num, Doc_Year?

robert_mika
Master III
Master III

Use ApplyMap to bring back your missing values

Don't join - use Applymap instead

settu_periasamy
Master III
Master III

Hi,

May be like this..

T1:

LOAD * INLINE [

    DOC_NUM, DOC_YEAR, ACTIVITY, CENTER, STATUS, REGION

    1, 2013, 1, 100, C, NORTH

    1, 2014, 10, -, O, NORTH

    2, 2015, 500, 200, F, SOUTH

    3, 2013, 30, -, C, EAST

    4, 2014, 10, 300, O, WEST

    5, 2015, 1, -, W, WEST

];

Left Join(T1)

LOAD DOC_NUM, DOC_YEAR, ACTIVITY, CENTER as CENTER1;

LOAD * INLINE [

      DOC_NUM, DOC_YEAR, ACTIVITY, CENTER

    1, 2014, 10, 50

    3, 2013, 30, 150

    5, 2015, 1, 300

] ;

NoConcatenate

T2:

Load DOC_NUM,

  DOC_YEAR,

  ACTIVITY,

  if(CENTER='-',CENTER1,CENTER) as CENTER,

  STATUS,

  REGION Resident T1 ;

DROP Table T1;

settu_periasamy
Master III
Master III

Alternate Solution using ApplyMap:

Mapping:

Mapping LOAD DOC_NUM&DOC_YEAR&ACTIVITY as Key, CENTER;

LOAD * INLINE [

      DOC_NUM, DOC_YEAR, ACTIVITY, CENTER

    1, 2014, 10, 50

    3, 2013, 30, 150

    5, 2015, 1, 300

] ;

T1:

Load *,DOC_NUM&DOC_YEAR&ACTIVITY as Key;

LOAD * INLINE [

    DOC_NUM, DOC_YEAR, ACTIVITY, CENTER, STATUS, REGION

    1, 2013, 1, 100, C, NORTH

    1, 2014, 10, -, O, NORTH

    2, 2015, 500, 200, F, SOUTH

    3, 2013, 30, -, C, EAST

    4, 2014, 10, 300, O, WEST

    5, 2015, 1, -, W, WEST

];

NoConcatenate

T2:

LOAD DOC_NUM,

  DOC_YEAR,

  ACTIVITY,

  If(CENTER='-',ApplyMap('Mapping',Key),CENTER) as CENTER,

  STATUS,

  REGION

  Resident T1;

DROP Table T1;