Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have two fields as below:
Name | Value |
Agreement_No | 0000005238;ABC;123 |
Agreement_Desc | 0000001234;PQR;456 |
Agreement_Amt | 0000009876;XYZ;789 |
the first field is Descriptions and the second field is values.
I have separated descriptions to a separate table as below using script
Agreement_No | Agreement_Desc | Agreement_Amt |
---|---|---|
1 | - | - |
- | 2 | - |
- | - | 3 |
I have separated values to a separate table as below using script
field 1 | field 2 | field 3 |
---|---|---|
0000005238 | ABC | 123 |
0000001234 | PQR | 456 |
0000009876 | XYZ | 789 |
Now, my final output should be as below. How can i achieve this?
I have tried using Concatenate but that does not help.
Agreement_No | Agreement_Desc | Agreement_Amt |
---|---|---|
0000005238 | ABC | 123 |
0000001234 | PQR | 456 |
0000009876 | XYZ | 789 |
Regards,
Vishal
Look at this example
Thanks for the response Yuri. I have field descriptions in one column and field values in another column. Using those two fields i am trying to create a table in Qlikview.
Your out treats everything as data.
Instead of having Table.A, TESTE, TESTE2 as column headers. I want Agreement_No, Agreement_Desc, Agreement_Amt as column header and the value in TESTE2 field above arranged as below.
Agreement_No | Agreement_Desc | Agreement_Amt |
---|---|---|
0000005238 | ABC | 123 |
0000001234 | PQR | 456 |
0000009876 | XYZ | 789 |
I am attaching the file, that i have used.
Please let me know your thoughts.
Vishal
Ok, try this!
Hi Yuri,
That works perfect but just one more thing in here.
It works fine for static structure but flat file will have structure that will change depending on scenario.
for instance the flat file might have additional field and value.
EX:
Name | Value |
Agreement_No | 0000005238;ABC;123;Jan |
Agreement_Desc | 0000001234;PQR;456;Feb |
Agreement_Amt | 0000009876;XYZ;789;Mar |
Period | 0000001024;DEF;999;Apr |
In such case, my output should be as below without changing the script:
Agreement_No | Agreement_Desc | Agreement_Amt | Period |
---|---|---|---|
0000005238 | ABC | 123 | Jan |
0000001234 | PQR | 456 | Feb |
0000009876 | XYZ | 789 | Mar |
0000001024 | DEF | 999 | Apr |
Please advice.
Thanks,
Vishal
This is how i was able to achieve it. PFA file.
Thanks a lot Yuri!.
Vishal
Very good!