Icon

02 - Excel Automation - Solution

This workflow goes along with my weekly newsletter 'The Finance Alchemist's Transformation Scroll' where I help finance professionals to make the next step in their career by automating data and spreadsheet tasks with KNIME.

If you're interested in this free newsletter (with a little bit of nerdiness inside), make sure you click the link below. It's totally free and you also can read past issues.

Annotations and comments
  • KNIME Rune: The JOINER Node 1. Execute both Excel Reader Nodes to get the source data into KNIME (both source files come together with this workflow, so you don't have to download anything in addition) 2. Add a JOINER Node to the workflow %%000092a. Connect the 1st Excel Reader output (Purchase Data) to the upper Joiner Node input %%000092b. Connect the 2nd Excel Reader output (Product Data) to the lower Joiner Node input 3. In the Joiner Node configuration select Product ID for both tables as matching criterion, make also sure you checked "Matching Rows" & "Left Unmatched Rows" so you get left and middle yellow in the icon 4. In the tab "Column Selection" keep everything from the top input box and only the columns product & item price in the bottom one 5. Execute and say good bye to VLOOKUPs :)
  • KNIME Charm: The ROW FILTER Node 1. Add a ROW FILTER node to the top input port of the Joiner Node 2. In the configuration make sure that "Column to test" is set to quantities, as this will have a red question mark (aka missing value) for the totals row 3. Select the last option "only missing values match" 4. On the left sidebar set "Exclude Rows by their attribute value" - this will look for rows where the column quantities has a missing value (only our totals row has that) and exclude it from the table 5. Execute see how the totals row disappears
  • KNIME Talisman: The GROUPBY Node 1. First connect a String To Number Node to the output of the Row Filter Node (we need to convert the item price to a decimal number, right now it's a text) 2. In its configuration (double click on the node), keep only the item price in the green box 3. Execute 4. Add a GROUPBY Node to the output port of the String to Number Node 5. Open the config and in the 1st subtab (Groups) make sure you only have Product in the green include box (this is the category you want to "group by") 6. Click on the second subtab (Manual Aggregation) in the left sidebar (Available Columns) double-click on item price. Then - once it's in the right box - click on Mean and instead select Sum as an aggregation method 7. Close the config and execute - voilà - you have summed the item prices per Product
  • import Purchase Data
  • import Product Data
  • calculate Sum(item price) per Product
  • add Product, item price to the table
  • drop the totals row (where e. g. quantities has a missing value)
  • convert item price from a text to a number (for calculation)

Nodes

Extensions

Links