The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Concatenate first and second value of an attribute

die_eikedie_eike Member Posts: 10 Contributor II
Hello community!

I have an example set with two attributes and two values. "Word" is nominal, "total" is numerical.

word    total
a          10
b           6

want to do the following: generate new attributes in which the first and the second value are concatenated and appear in the same row:

word(concat)  total(concat)
a_b                  10_6

I will place this subprocess into a loop, looping over 240 example sets with different values for "word" and "total"; so I cannot use any fixed value for the concatenation, but need to identify the values I want to concatenate (which are of the same attribute) by their order (first_second).

I tried generate attribute but couldn't find out how to identify the values by their order. I also tried to transpose the whole thing which gave me an error because of duplicate IDs.

I spent the whole day searching for operators to solve this apparently simple process but did not yet find a solution. Maybe somebody has an idea on this?

Best,
Eike

Best Answers

Answers

  • die_eikedie_eike Member Posts: 10 Contributor II
    Thanks a lot kayman! I should have known that aggregate would do the trick! ;)
    Just hypothetically, what would I do if I had more than 2 values (let's say 10) and would like to concatenate some of them by their order, e.g. the first, third and seventh value?

    Best,
    Eike
  • die_eikedie_eike Member Posts: 10 Contributor II
    Thumbs up!
Sign In or Register to comment.