Skip to main content

I am pivoting a table based on an ID field so that all diagnosis codes are pivoted and grouped based on the ID. Here is an example of source and final tables I am trying to acheive. What transformers will be appropriate to get this done?

I think that you can use an AttributePivoter to get the desired result.


This is where I am confused with the pivoter: I selected patientID to group rows by but for columns I want to select multiple columns to pivot under a single column named "Diagnosis Codes". I do not see the option to select multiple columns.


This is where I am confused with the pivoter: I selected patientID to group rows by but for columns I want to select multiple columns to pivot under a single column named "Diagnosis Codes". I do not see the option to select multiple columns.

Depending on the datasource you can use a sqlCreator to get an union select query or you can use the inlineQuerier to get the desired result.

 

See attached template

 

demo.fmwt

 

 


Depending on the datasource you can use a sqlCreator to get an union select query or you can use the inlineQuerier to get the desired result.

 

See attached template

 

demo.fmwt

 

 

@stalknecht, thanks for your comment. That is exactly what I ended up doing. I am using SQLCreator with Unpivot sql query to transpose from columns to rows.

 


Reply