Skip to main content
Solved

How to transpose an attribute table?

  • January 17, 2023
  • 4 replies
  • 507 views

tb09114
Supporter
Forum|alt.badge.img+23

I need to transpose an attribute table and tried so far the StatisticsCalculator as well as the AttributePivoter, but do not get the result I need. In addition I was following the advice of Mark (@mark2atsafe​ ) in this posting at StackExchange.

 

While the advice from mark looks 'straight' forward, I struggle with the reader-as-resource since the data are produce through analysis within the workspace where I need to transpose the attributes.

 

After sorting my results I get the following attribute table

attribute tableand what I need is a structure like

 

image.png 

So, the attribute values from the 'label' column have the provide colum names, while 'Area_perc' has to provide the corresponding values for these columns, and everything is grouped by 'Sectorname'.

 

How can I achieve that within FME?

Best answer by ebygomm

You should be able to follow the method posted here

 

https://community.safe.com/s/question/0D5Dm000006Zdi5KAC/transpose-a-table

View original
Did this help you find an answer to your question?

4 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • Best Answer
  • January 17, 2023

You should be able to follow the method posted here

 

https://community.safe.com/s/question/0D5Dm000006Zdi5KAC/transpose-a-table


tb09114
Supporter
Forum|alt.badge.img+23
  • Author
  • Supporter
  • January 17, 2023

@ebygomm​ Thanks a lot for the fast reply. I am surprised though that there is a difference in selecting an attribute when creating a new attribute in the AttributeCreator and writing 

@Value(label)

settings dialogWhen selecting an attribute from the context menu, it will set the value for the attribute to 'label' and nothing will happen with respect to the assignment of the correct values, while writing it as shown in the screenshot it does the trick!


ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • January 17, 2023
tb09114 wrote:

@ebygomm​ Thanks a lot for the fast reply. I am surprised though that there is a difference in selecting an attribute when creating a new attribute in the AttributeCreator and writing 

@Value(label)

settings dialogWhen selecting an attribute from the context menu, it will set the value for the attribute to 'label' and nothing will happen with respect to the assignment of the correct values, while writing it as shown in the screenshot it does the trick!

It's not necessary to type, you just need to select Attribute Value from the menu (although typing it will work as well)

image


pgammie
Contributor
Forum|alt.badge.img+6
  • Contributor
  • April 22, 2025

This thread was really helpful to me, I selecting the attribute from the “Select Attribute” instead of the “Attribute Value” and couldn’t understand why it wasn’t working but I see the difference now. Thank you for posting! It is working perfectly. 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings