Skip to main content
Solved

Row Values to Columns

  • February 29, 2020
  • 3 replies
  • 128 views

Forum|alt.badge.img

Hello,

I have summary output coming from the StatisticsCalculator that I would like to rearrange such that row values become column headings with values for these coming from the statscalc count output (see input and end result images below). I've tried AttributePivoter, AttributeTransposer without success.

Thanks.

Tony

Best answer by takashi

Hi @aviveiro, try this.

Firstly create a new attribute whose name is equal to the value of STOCKING and assingn the value of STOCKING_count to the new attribute, with the AttributeCreator as in:

Then, aggregate all the features using the Aggregator with Merge Incoming Attributes mode.

Finally expose the new attribute names (originally equal to values of STOCKING) with the AttributeExposer, then remove unnecessary attributes optionally.

The workflow looks like this.

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

3 replies

takashi
Influencer
  • Best Answer
  • February 29, 2020

Hi @aviveiro, try this.

Firstly create a new attribute whose name is equal to the value of STOCKING and assingn the value of STOCKING_count to the new attribute, with the AttributeCreator as in:

Then, aggregate all the features using the Aggregator with Merge Incoming Attributes mode.

Finally expose the new attribute names (originally equal to values of STOCKING) with the AttributeExposer, then remove unnecessary attributes optionally.

The workflow looks like this.


takashi
Influencer
  • February 29, 2020
takashi wrote:

Hi @aviveiro, try this.

Firstly create a new attribute whose name is equal to the value of STOCKING and assingn the value of STOCKING_count to the new attribute, with the AttributeCreator as in:

Then, aggregate all the features using the Aggregator with Merge Incoming Attributes mode.

Finally expose the new attribute names (originally equal to values of STOCKING) with the AttributeExposer, then remove unnecessary attributes optionally.

The workflow looks like this.

If you need to change Softwood and Hardwood to their abbreviation SW and HW, perform changing them before the AttributeCreator.


Forum|alt.badge.img
  • Author
  • February 29, 2020
takashi wrote:

Hi @aviveiro, try this.

Firstly create a new attribute whose name is equal to the value of STOCKING and assingn the value of STOCKING_count to the new attribute, with the AttributeCreator as in:

Then, aggregate all the features using the Aggregator with Merge Incoming Attributes mode.

Finally expose the new attribute names (originally equal to values of STOCKING) with the AttributeExposer, then remove unnecessary attributes optionally.

The workflow looks like this.

Terrific @takashi!

One thing I did have to do was manually type in the new attribute names (originally equal to values of STOCKING) in AttributeExposer because I didn't see them as attributes to expose.

Thank you.

Tony


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