Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

How do I aggregate/concatenate values from columns into one row (and set filter)

Dear Community,

 

i am struggling with this challenge:

 

how do I create the "new value" in this example:

VALUEidindexNew Value
ABC10ABCDEF
DEF11ABCDEF

 

and more advanced how do I get "NEW VALUE IN" and NEW VALUE OUT" in this example?

VALUEidindexNew VALUE INNew VALUE OUT
ABC10nullABCDEF
DEF11ABCDEFDEFGHI
GHI12DEFGHInull

 

 

all help would be greatly appreciated.

 

2 Replies

  • Anonymous 

    You need to explain the logic a bit more clearly if you need quality answers 


    • Anonymous's avatar
      Anonymous
      Not applicable

      You are absolutetly right. Please apologize:

      how do I create the "new value" in this example:
      >As you can see I have a table with Dimnsion VALUE, which contains ABC and DEF, these are connetected by the field ID. So I need to establish a connection between these two independant data sets based on the ID=1. so the first three columns is the data available to me and the last column "new value" is what I am hopping to calculate.
      So someting like New Value = concat(VALUE) linked/aggregated by ID

       

      value id
      index New Value
      ABC 10 ABCDEF
      DEF 11ABCDEF

       

      and more advanced how do I get "NEW VALUE IN" and NEW VALUE OUT" in this example?

      > this takes the idea from above one step futher:
      Again I have only data available from column 1, 2 and 3. And I am trying to calculate column 4 "new value in" and column 5 "new value out"

      I need to connect the "values" based on "ID" and filter them based in the "Index". Here I need to connect each value with the "value" within the "ID" but in a different way:

       

      so something like :

      New Value In = concat (value) linked/aggregated by ID only for INDEX where INDEX-1

      New Value Out=concat (value) linked/aggregated by ID only for INDEX where INDEX+1

       

       

      value     
        idindexNew VALUE IN  New VALUE OUT
      ABC  10null  ABCDEF
      DEF  11ABCDEF  DEFGHI
      GHI  12DEFGHI  null

       

      I hope this makes it more clear.