Skip to main content

Hi dear FME experts,

I have a task to transform matrix style table into simple (flattened) one like on the screenshot below:

tableTransformI can unpivot it in Excel, but Is there a way to do this in FME with standard or maybe custom transformers?

If yes could you please post some examples?

Thank you very much in advance!

I think you forgot to attach the screenshot.


Sorry, added.


You are looking for the AttributeExploder.


Yes it is somewhere around AttributeExploder, but I can't figure out logic of how to do exactly what I've described. Any examples would be much appreciated.


Yes it is somewhere around AttributeExploder, but I can't figure out logic of how to do exactly what I've described. Any examples would be much appreciated.

If you share a sample of your data, like the part of you printscreen, I can create a sample workspace. Otherwise I have to reproduce your sample data as well.


Yes it is somewhere around AttributeExploder, but I can't figure out logic of how to do exactly what I've described. Any examples would be much appreciated.

You want to have a workflow something like this

Explode the attributes, set the Attribute Name Label to "Unit" and the Attribute value Label to "Value", set Keep Attributes to Yes (as you want to keep the Date attribute, you'll get rid of the others later), use a Tester to keep only those records where the Unit attribute starts with Unit, finally an AttributeKeeper to keep only the Date, Unit & Value Attributes

Capture


If you share a sample of your data, like the part of you printscreen, I can create a sample workspace. Otherwise I have to reproduce your sample data as well.

Yes, sure please find in the attachment to this message. Thank you very much in advance!


You want to have a workflow something like this

Explode the attributes, set the Attribute Name Label to "Unit" and the Attribute value Label to "Value", set Keep Attributes to Yes (as you want to keep the Date attribute, you'll get rid of the others later), use a Tester to keep only those records where the Unit attribute starts with Unit, finally an AttributeKeeper to keep only the Date, Unit & Value Attributes

Capture

Great! Thank you for your efforts and help. I'll try your suggestions for sure. I've posted data sample upper as well. Thanks again!


If you share a sample of your data, like the part of you printscreen, I can create a sample workspace. Otherwise I have to reproduce your sample data as well.

Here you go.


If you share a sample of your data, like the part of you printscreen, I can create a sample workspace. Otherwise I have to reproduce your sample data as well.

Yes - that's exactly what I was looking for! I found couple of tutorials which describes table pivoting but couldn't make it work. You did it just easy.

Thanks again for your help!


Reply