Icon

JKISeason2-4_​sryu

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

read dataarea A / B12 monthsQuarterMonth(name)exp / 12exp / 4Quarteruse intersection of columnssubstr(lowerCase($Month (name)$),0,3)join("Q",string($Quarter$))Month(name)Table Reader Row Splitter Create Date&TimeRange Extract Date&TimeFields Math Formula Math Formula GroupBy Cross Joiner Cross Joiner Concatenate String Manipulation String Manipulation GroupBy Column Resorter read dataarea A / B12 monthsQuarterMonth(name)exp / 12exp / 4Quarteruse intersection of columnssubstr(lowerCase($Month (name)$),0,3)join("Q",string($Quarter$))Month(name)Table Reader Row Splitter Create Date&TimeRange Extract Date&TimeFields Math Formula Math Formula GroupBy Cross Joiner Cross Joiner Concatenate String Manipulation String Manipulation GroupBy Column Resorter

Nodes

Extensions

Links