Skip to main content
Solved

Transform matrix table to simple table

  • March 5, 2021
  • 10 replies
  • 343 views

siriosus
Contributor
Forum|alt.badge.img+4

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!

Best answer by nielsgerrits

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

10 replies

nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • March 5, 2021

I think you forgot to attach the screenshot.


siriosus
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • March 5, 2021

Sorry, added.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • March 5, 2021

You are looking for the AttributeExploder.


siriosus
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • March 5, 2021

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.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • March 5, 2021

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.


ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • March 5, 2021

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


siriosus
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • March 7, 2021

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!


siriosus
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • March 7, 2021

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!


nielsgerrits
VIP
Forum|alt.badge.img+60
  • 2938 replies
  • Best Answer
  • March 8, 2021

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.


siriosus
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • 13 replies
  • March 8, 2021

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!