Thanks for your reply.
Please find the attached sample data and sample qvw file.
In the qvw file I have showed how I m getting the data currently. But I want the result to be shown in a single row.
Please let me know if you need further more details.
Dummy File.zip 141.3 K
Hi Leni, from that simple table you can create the expected result using a group by:
MinString(AB) as AB,
MinString(C) as C
Resident YourPreviousTable Group By ID;
This will keep only one [AB] and [C] value for each ID (the first one alphabetically sorted). If Codes are numbers you can use Min() instead of MinString()
Thanks for your reply Ruben.
I just tried your solution with my dummy data and it is giving as I expected but I found data missing when I used the same.
For the same ID if I have Codes as MBNR,NAWD,FOOC,ABUA
for the calculation If(Match(Code,'NAWD','MBNR'),Code) as [NAWD/MBNR Codes] it should return value for both MBNR & NAWD
but once I used your solution it is showing data only for the first occurrence and not for the second.
Attached screenshot for your reference.
Please help me to resolve the issue.
Hi Leni, yes, it was intented as i advised: "This will keep only one [AB] and [C] value for each ID (the first one alphabetically sorted)."
If you want all values concatenated use Tamil's solution, If you want NBNR and NAWD in different rows you can use something like:
LOAD ID, Subfield([NAWD/MBNR], ',') as [NAWD/MBNR], [FOOC Code]; //This LOAD reads from below LOAD
LOAD ID, Concat([NAWD/MBNR], ',') as [NAWD/MBNR], Minstring([FOOC Code]) as [FOOC Code]
FROM... Group by ID;