This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
I have the following data, and I want the output to be on a separate line. I am almost there, but my issue is sorting the output.
I just want a single line for the VIN with the multiple paint descriptions displayed, but I want the Body color to be the first displayed (PNTCd begins with a P). I am stuck on getting the first column listed the Body paint. Any ideas? I attached my working YXMD.
I've attached an example that accomplishes this. Basically all I added to your flow was a sort order on the first character of PntCd. I used a "SWITCH" statement, defaulting to 2, to set the value to 1 for any PntCd that starts with a P. I added this sort as a key field to the Transpose, and included it in the sort.
The advantage of this solution is that you could swap the default to something like 999, then you could do multiple hierarchies if you had P, C, and E codes, as an example.