Skip to main content
Solved

Transposing part of a simple data table


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.

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

4 replies

takashi
Influencer
  • Best Answer
  • October 26, 2018

This workflow might help you.


Forum|alt.badge.img
  • Author
  • 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
takashi wrote:

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
Influencer
  • March 1, 2019
takashi wrote:

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

Reply


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