My table looks somewhat like this, and I need the result in the Expected format
I have attached the table format:
Can someone please help me out with this, as in Sorter node doesn’t seem to help me in this case. What else can I be using in this scenario, to arrange the column values in user defined format?
Any help would be appreciated, Thank you!
I believe the esiest way to sort the rows as in your final table is to use a -Join- node with a first table (as left table in joiner) created with -Table Creator-node which should contain just the column “A comment” in your right order. Then join by column “A comment” and in the column selection, keep only the columns of your second table (as right table in joiner).
Hope it helps. Otherwise, please post here your table in text format and we will take it from there.
@aworker Thank you for the suggestion, but sometimes more comments might be present, depending upon the input data. In that case, what would be the best approach to solve this?
Here are the table values as requested:
|Ok - no difference
|Ok tax pop off(part of gov)
|ICT to check
||Team to check
My pleasure @Saishiyam
Sorry I find difficult to understand the logic behind what you need to do. Do you always want to have the N/A at the “B Comment” column appearing in the last rows but before your “Grand total” row ? Is that what you mean ?
Actually, this is a pivot created by knime. Now, I want to arrange the ‘A Comment’ column values according to requirements (Like moving the 1st comment to 3rd position and vice verse etc)
This is the requirement. Is it possible to achieve the same?
@Saishiyam I’m still missing the logic of the sorting.
Why should 1st A comment be moved to 3rd position and vice-versa ? Thanks.
@aworker That’s the business requirement and the stakeholders want to maintain that
Maybe this answers your question
20220525 Pikairos Arranging column values.knwf (40.3 KB)
But still I’m a bit perplex lol
aworker’s solution is more solid, but if you want to change the order quickly maybe this can help:
If you transpose you can rearange the columns with Table Manipulator manually the way you want it (whatever the Logic might be).
Did any of the solutions posted here solved your problem ? Feedback would be much appreciated
Actually I made use of rule engine and created a key column based on the order in which my comments has to appear, and then sorted it in ascending order. That actually worked for me.
Thank you for all the suggestions!
Thanks for the feedback. Maybe you could post here your solution for the interest of the community
Hi @Saishiyam , could you share your solution here so others can benefit as well?
@aworker @badger101 here is what I tried
Reordering rows (1).knwf (10.0 KB)
mentioned the comments in rule engine and assigned key to them and ordered them using a sorter node.
It sounds to me a very wise alternative solutions.
Thanks @Saishiyam for sharing
Thanks for sharing! @Saishiyam
@aworker Thank you!
Is there any possibility that I can add color to cells dynamically without manually specifying the range?
I need the grand total row to be colored, but the row which it might be present will differ depending upon the number of comments present. The continental node provides the xls range selector, but that looks more of hard coding way. Is there any other way through which I can achieve this
I have posted at the KNIME HUB a generic example on how to dynamically format an Excel Sheet using the Continental nodes:
This example is not doing what you exactly need. You would need from there to customize this component to your needs but the example already covers how to do it for most of the formatting features one would normally need.
Hope it helps.