Skip to main content
Solved

How to pivot or change the layout of a data table?

  • October 20, 2021
  • 3 replies
  • 49 views

trevorb
Contributor
Forum|alt.badge.img+3

I am trying to go from this:

initial_weather_table 

to this:

weather_tableWhere "Current Weather" is the first "validTime" record and "Next 24 hrs" is the second "validTime" record.

 

I messed around with the concept in excel and came up with the following which might work but can't seem to replicate it in FME:

pivot_excel 

I've played with the AttributePivoter, StatisticsCalculator, AttributeExploder, and others and just can't seem to alter the table to something similar to what is shown above. The idea would be to go from reading in arcgis server service features and write out to an html table (or maybe something else) which would look like (or similar to) the above table.

 

Any ideas are greatly appreciated!

 

Best answer by virtualcitymatt

So the AttributeExploder is definitely needed here. Here's an example workflow

 

imageThe aggregator can then be used to get the data inline

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.

3 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • 2000 replies
  • Best Answer
  • October 21, 2021

So the AttributeExploder is definitely needed here. Here's an example workflow

 

imageThe aggregator can then be used to get the data inline


virtualcitymatt
Celebrity
Forum|alt.badge.img+47
  • Celebrity
  • 2000 replies
  • October 21, 2021

So the AttributeExploder is definitely needed here. Here's an example workflow

 

imageThe aggregator can then be used to get the data inline

Here's what the output looks like

image


trevorb
Contributor
Forum|alt.badge.img+3
  • Author
  • Contributor
  • 5 replies
  • October 21, 2021

Your workflow worked for my needs. Thanks so much!