Icon

JKISeason2-4_​tark

Challenge 04: Spread Yearly Values Across Months
Level: Easy

Description: Your team created a summary of the total amount spent last year on each project. The data looks like the following:

Year Area Project exp
2022 area A proj A 120
2022 area B proj X 160

The finance department of your company, however, would like to have a more granular overview of the expenditures. In particular, the expenditures for projects in area A should be spread equally across 12 months, while those for projects in area B should be grouped by quarters. In the end, the above table should look like the following:

Year Area Project exp
2022 area A proj A jan 10
2022 area A proj A feb 10
...
2022 area B proj X Q1 40
2022 area B proj X Q2 40
...

Authors: hanss and bruno29a

Dataset: Expenditures Data on KNIME Community Hub

Node 31Divide "exp"by "term"Add 12 toa new column named "term"Increase each rowby the number of "term"Add 4 toa new columnnamed "term"Increase each rowby the number of "term"Divide "exp"by "term"Add RowID toa new columnnamed "term_2"Add RowID toa new columnnamed "term_2"Create 12 comsecutivemonthsExtract month (number)and month (name)Get the firstthree charactersReplace the resulting numberwith month names#Removeunnecessarycharacters#Removeunnecessarycharacters#Join "Q"with the resulting numberNode 48$term$ = 12 AND $Area$ LIKE "area A" => TRUE$term$ = 4 AND $Area$ LIKE "area B" => TRUENode 50Table Reader Math Formula ConstantValue Column One Row to Many ConstantValue Column One Row to Many Math Formula RowID RowID Create Date&TimeRange Extract Date&TimeFields String Manipulation Cell Replacer String Manipulation String Manipulation Concatenate Rule-basedRow Filter Sorter Node 31Divide "exp"by "term"Add 12 toa new column named "term"Increase each rowby the number of "term"Add 4 toa new columnnamed "term"Increase each rowby the number of "term"Divide "exp"by "term"Add RowID toa new columnnamed "term_2"Add RowID toa new columnnamed "term_2"Create 12 comsecutivemonthsExtract month (number)and month (name)Get the firstthree charactersReplace the resulting numberwith month names#Removeunnecessarycharacters#Removeunnecessarycharacters#Join "Q"with the resulting numberNode 48$term$ = 12 AND $Area$ LIKE "area A" => TRUE$term$ = 4 AND $Area$ LIKE "area B" => TRUENode 50Table Reader Math Formula ConstantValue Column One Row to Many ConstantValue Column One Row to Many Math Formula RowID RowID Create Date&TimeRange Extract Date&TimeFields String Manipulation Cell Replacer String Manipulation String Manipulation Concatenate Rule-basedRow Filter Sorter

Nodes

Extensions

Links