Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
IMPORTANT security patches for GeoAnalytics Server available to download: READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
star_limit
Creator II
Creator II

Pattern specific records

Hello,

Today I received a very unusual data request and thought I can get some help from the community again. I tried to imitate a similar logic to come up with the exact work scenario. I have table A, B, & C below. Vendor needs information in a specific format as I have at the very bottom on Result section. First field on Result needs to be hard coded letters. D stands for demographic, R for revenue, and P for Procedure. Any solution or advice is greatly appreciated.

   

Table A
IDNameDate
ID101James11/1/2017
ID102Rock11/2/2017
ID103Paul11/5/2017

   

Table B
IDChargePayment
ID101$10 $5
ID102$50 $25
ID103$30 $15

Table C
IDProcedure
ID1011001
ID1021002
ID103

1004

   

Result
DID101James11/1/2017
RID101$10 $5
PID1011001
DID102Rock11/2/2017
RID102$50 $25
PID1021002
DID103Paul11/5/2017
RID103$30 $15
PID1031004
1 Solution

Accepted Solutions
its_anandrjs

What is mean by result field or any logic behind this.

You can try this way by concatenating and give same field name for this, and this is not a big task, right.

But please elaborate what is mean by result field is there any logic for this.

//Table A  

LOAD ID,    Name,    Date,'D' as Result;

LOAD * Inline

[

ID,    Name,    Date

ID101,    James,    11/1/2017

ID102,    Rock,    11/2/2017

ID103,    Paul,    11/5/2017

];

  

//Table B  

LOAD ID,Charge as Name,Payment as Date,'R' as Result;

LOAD * Inline

[

ID,    Charge,    Payment

ID101,    $10,    $5

ID102,    $50,    $25

ID103,    $30,    $15

];

//Table C   

LOAD ID,Procedure as Name,'' as Date,'P' as Result;

LOAD * Inline

[

ID,    Procedure

ID101,    1001

ID102,    1002

ID103,  1004

];


Output:-

op.PNG

View solution in original post

2 Replies
its_anandrjs

What is mean by result field or any logic behind this.

You can try this way by concatenating and give same field name for this, and this is not a big task, right.

But please elaborate what is mean by result field is there any logic for this.

//Table A  

LOAD ID,    Name,    Date,'D' as Result;

LOAD * Inline

[

ID,    Name,    Date

ID101,    James,    11/1/2017

ID102,    Rock,    11/2/2017

ID103,    Paul,    11/5/2017

];

  

//Table B  

LOAD ID,Charge as Name,Payment as Date,'R' as Result;

LOAD * Inline

[

ID,    Charge,    Payment

ID101,    $10,    $5

ID102,    $50,    $25

ID103,    $30,    $15

];

//Table C   

LOAD ID,Procedure as Name,'' as Date,'P' as Result;

LOAD * Inline

[

ID,    Procedure

ID101,    1001

ID102,    1002

ID103,  1004

];


Output:-

op.PNG

star_limit
Creator II
Creator II
Author

Hi Anand,

I meant to say "Output" instead of the "Result". I did not know we can concatenate this way. This is not a big task so I will try to apply your logic. This works for me.

Thanks much.