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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Split single column records to different columns based on a logic

HI,

I Have below table and it has different actions and indicator.

NAMEDATEACTIONINDICATOR
ABC5/16/2014AY
ABC5/17/2014BY
AAA5/18/2014AN
AAA5/18/2014BY
AAA5/19/2014CY
BGD5/20/2014AN
BGD5/21/2014BN

From this table i want to create a table below using above data

NAMEACTION A dateACTION C Date
ABC5/16/2014-
AAA-5/19/2014
BGD--

Here we take ACTION A date - if ACTION = A and INDICATOR=Y

and               ACTION B date- if ACTION = B and INDICATOR=N

i want to display the name if a record doesn't satisfy above conditions.

Please help me to solve this

Thank You.

3 Replies
Not applicable

Hi Anuradha,

Pls check this app

Logic needs to be done in the Load Script

Table1:

LOAD * INLINE [

    NAME, DATE, ACTION, INDICATOR   

    ABC, 5/16/2014, A, Y

    ABC, 5/17/2014, B, Y

    AAA, 5/18/2014, A, N

    AAA, 5/18/2014, B, Y

    AAA, 5/19/2014, C, Y

    BGD, 5/20/2014, A, N

    BGD, 5/21/2014, B, N

];

Table2:

LOAD NAME,

  if(ACTION='A' and INDICATOR='Y',DATE) as [ACTION A DATE],

  if(ACTION='B' and INDICATOR='Y',DATE) as [ACTION B DATE],

  if(ACTION='C' and INDICATOR='Y',DATE) as [ACTION C DATE]

Resident Table1;

//drop Table Table1;

Thanks,

Sri

MarcoWedel

or in the front end:

QlikCommunity_Thread_130704_Pic1.JPG.jpg

QlikCommunity_Thread_130704_Pic2.JPG.jpg

QlikCommunity_Thread_130704_Pic3.JPG.jpg

hope this helps

regards

Marco

MarcoWedel

Please mark as answered if there are no further questions

thanks

regards

Marco