Pablo
June 9, 2020, 4:46pm
1
Hi all,
sorry, i dont know how to explain what i need very well (my english is a little poor) , but i´ll try to do the best i can… (I’ve been searching on the forum but havent found anything)
i have a table like this one:
code
initial_range
final_range
price
AAA
40
42
1000
AAA
43
46
1500
BBB
30
31
200
BBB
32
35
250
and i need to convert to something like this:
code
range
price
AAA
40
1000
AAA
41
1000
AAA
42
1000
AAA
43
1500
AAA
44
1500
AAA
45
1500
AAA
46
1500
BBB
30
200
BBB
31
200
BBB
32
250
BBB
33
250
BBB
34
250
BBB
35
250
thanks to all, hope someone could help
3 Likes
hi there…
it looks like you are looking for the group by Node…you can even group by multiple colums…
3 Likes
I might be misunderstanding OP, but it seems like he wants anti-group-by, no? His starting table is an aggregation on price
, his desired end table is an expansion on that aggregation calculating range
values. Does GroupBy really do that?
3 Likes
Pablo
June 9, 2020, 5:26pm
5
thank all for your asnwers,
exactly as quaeler say’s i need some type of “anti-group by”
i’ve been trying with groupby but i cant get the results that i need
1 Like
to me it looks like group by the code and range…
2 Likes
I’m thinking Unpivoting and then interpolate? The interpolation will be the trickier part.
4 Likes
you are right… at a closer look this can not be done by Groupby…it is rather an ungroup…would be good to have the raw data of that group by…
2 Likes
HansS
June 9, 2020, 6:14pm
9
Hi @Pablo ,
See this workflow. Just looping around. A Count loop, within a Group loop . initial_final_range_to_complete.knwf (38.2 KB)
gr. Hans
6 Likes
Pablo
June 9, 2020, 6:21pm
10
thanks to all, this comunity its great!!
@HansS , that worflow it’s exactly what i was looking for. Thanks so much, i really apreciate it
4 Likes
Hi @Pablo
Complementary to the nice solution proposed by @HansS , I would like (if you don’t mind ) to add an alternative Java based solution:
20200608 Pikairos initial final range to complete.knwf (20.0 KB)
in case this would be of extra help to you and other knimers.
All the best,
Ael
5 Likes
Pablo
June 12, 2020, 8:09am
12
thanks @aworker for that Java solution!
1 Like
system
Closed
June 19, 2020, 8:09am
13
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.