Skip to main content
Solved

Transposing part of a simple data table

  • October 26, 2018
  • 4 replies
  • 29 views

Forum|alt.badge.img

Hi,

I don't find out how to transpose a part of a simple data table.

I read a lot in the documentation and this kb about the AttributePivoter and AttributeTransposer transformers or other tips and tricks (with AttributeExploder and Aggregator) but I don't get to use these solutions with my test case.

Here is a (simplified) sample of my input data:

And here is what I want as output:

As you can see, the switch has to be done between the "type" and "month" attributes but I have to keep the student column.

I would really appreciate any help because I'm stuck...

Thanks,

Christian

Best answer by takashi

This workflow might help you.

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.

4 replies

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • October 26, 2018

This workflow might help you.


Forum|alt.badge.img
  • Author
  • 19 replies
  • October 26, 2018

Hi Takashi,

You're fantastic !!

I reproduced your solution step by step and I don't really know how, but it works :)

I was very far from the solution so many many thanks !

Now, I try to understand this solution, I have particulair difficulties to understand the AttributeCreator parameters...but I will take time to analyze all this.

Best regards,

Christian


Forum|alt.badge.img
  • 28 replies
  • February 28, 2019

This workflow might help you.

Takashi,

 

I'm attempting to do a similar transpose with almost the exact same format as the example.

 

Could you explain why you created two field in the attribute creator, both labeled months?


takashi
Celebrity
  • 7843 replies
  • March 1, 2019

This workflow might help you.

0684Q00000ArLa1QAF.png

Hi @mariofederis, it's just for better understandability and maintainability. This single expression should return the same result.

@Format(%02d,@Evaluate(@Value(_element_index)+5))-2018