Icon

20230531 Pikairos JustKNIMEIt Season 2 Challenge 10 Calculating YTD and MTD for Restaurant Yummy No Loop

Restaurant Yummy records its sales values on a daily basis. The data contains two columns: Date and Sales. Year-to-Date (YTD) Sales and Month-to-Date (MTD) Sales are important metrics to track the revenue of the business. But what exactly are YTD and MTD values? The YTD value allows you to calculate the metric (e.g., sum of sales) for the current year, while the MTD value denotes a metric value for the current month. You are asked to build a KNIME Workflow that takes this data as input and adds YTD and MTD values across each record.

Challenge 10: Calculating YTD and MTD for Restaurant YummyDescription: Restaurant Yummy records its sales values on a daily basis. The data contains two columns: Date and Sales.Year-to-Date (YTD) Sales and Month-to-Date (MTD) Sales are important metrics to track the revenue of the business. Butwhat exactly are YTD and MTD values? The YTD value allows you to calculate the metric (e.g., sum of sales) for the currentyear, while the MTD value denotes a metric value for the current month. You are asked to build a KNIME Workflow that takesthis data as input and adds YTD and MTD values across each record.Workflow without loop Extract MonthFrom DateCalculate YTD Sales:CumulativeComputationSum of SalesSort inAscendingDate OrderGroupBy MonthTake theLast YTD SalesValueNegativeLag of MonthJoin PreviousMonth Totalto the CurrentMonth in a NewColumnSet MissingValue as 0Calculate MTDSales by SubtractingPrevious Monthtotal from YTD valueRename ColumnYTD SalesRemove UnwantedColumnsSales DataExtendedDatesConvert DateFrom Stringto DateFormatView Data Extract Date&TimeFields Moving Aggregation Sorter GroupBy Moving Aggregation Joiner Missing Value Math Formula Column Rename Column Filter Excel Reader String to Date&Time Generate RandomSales Data InteractiveTable (local) Challenge 10: Calculating YTD and MTD for Restaurant YummyDescription: Restaurant Yummy records its sales values on a daily basis. The data contains two columns: Date and Sales.Year-to-Date (YTD) Sales and Month-to-Date (MTD) Sales are important metrics to track the revenue of the business. Butwhat exactly are YTD and MTD values? The YTD value allows you to calculate the metric (e.g., sum of sales) for the currentyear, while the MTD value denotes a metric value for the current month. You are asked to build a KNIME Workflow that takesthis data as input and adds YTD and MTD values across each record.Workflow without loop Extract MonthFrom DateCalculate YTD Sales:CumulativeComputationSum of SalesSort inAscendingDate OrderGroupBy MonthTake theLast YTD SalesValueNegativeLag of MonthJoin PreviousMonth Totalto the CurrentMonth in a NewColumnSet MissingValue as 0Calculate MTDSales by SubtractingPrevious Monthtotal from YTD valueRename ColumnYTD SalesRemove UnwantedColumnsSales DataExtendedDatesConvert DateFrom Stringto DateFormatView DataExtract Date&TimeFields Moving Aggregation Sorter GroupBy Moving Aggregation Joiner Missing Value Math Formula Column Rename Column Filter Excel Reader String to Date&Time Generate RandomSales Data InteractiveTable (local)

Nodes

Extensions

Links