Hello,
I have a table like
id date role
1 2007 10
1 2019 11
2 2008 20
3 2005 30
3 2007 31
3 2018 32
ā¦
I want to transform this table so as I can see unique id and append columns as much as the id is repeated
example :
id date1 role1 date2 role2 date3 role3
1 2007 10 2019 11 - -
2 2008 20 - - - -
3 2005 30 2007 31 2018 32
Any help , thank you a lot !
Use
with grouping on id, pivoting on date and list/first/last aggregation on role.
2 Likes
Thanks for your response, but I want also date as data not a pivot !
HansS
August 13, 2019, 2:19pm
4
Hi @Abdessamad7
I created a workflow transform_a_table.knwf (37.4 KB) which I think does the job. Hope this helps.
gr. Hans
2 Likes
ipazin
August 14, 2019, 11:21am
5
Hi there @Abdessamad7 ,
In order to use only Pivoting node as suggested by @izaychik63 you should add additional column that will be Pivot column:
To create this column you can modify solution provided by @HansS in this topic:
example entries
column1
BAS
KRK
IOF
IOF
BAS
IOF
my solution should be
column1 | column2
BAS | 1
KRK | 1
IOF | 1
IOF | 2
BAS | 2
IOF | 3
how can i add a column with autoincrement counting the entries from column 1 ?
Br,
Ivan
1 Like
Thank you so much it was very helpful
1 Like
system
Closed
February 20, 2020, 1:42am
7
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.