Icon

Monthly and YTD Revenues

Comparing restaurant revenues month by month for 2022 and 2023, as monthly revenues and as YTD revenues.

YTD = Year To Date means the sum of revenues up to the current month.

Transactions from 2022 are saved in an Excel file, while transactions from 2023 are saved in a Google spreadsheet (which we made public for this example). So, we use an Excel Reader node to read data from 2022 and Google Sheets nodes to access the data for 2023. To access the Google spreadsheet, you are supposed to provide authentication for your Google account. Do not worry, authentication happens and remains at Google. Nothing will be stored with the KNIME workflow. After accessing the data:

- we extract parts of the date&time objects for each invoice,
- we perform a monthly aggregation with the Pivot node
- we calculate the YTD values with the metanode "YTD"
- We then concatenate/join the values for 2022 and 2023 and
- We visualize them in bar chart (monthly) and line plot (YTD)

Notice that we could have performed all aggregations within the bar chart node. However, for large amounts of data the loading (and refreshing if in a data app) of the views might take long time, since at each refreshing all totals must be recalculated. So we opted for pre-calculated values before visualization.

Read more on the topic Monthly and YTD Rvenue Aggregations on the KNIME Blog: https://www.knime.com/blog/how-to-calculate-year-to-date-aggregation

URL: Google Sheets Public Data 2017 https://docs.google.com/spreadsheets/d/1m5IyAL5R0MY1JlWN59zBK8yQ_oSDI-mgJwIDJqR-dl0/edit?usp=sharing
URL: KNIME Blog: Monthly and YTD Revenue Aggregations https://www.knime.com/blog/how-to-calculate-year-to-date-aggregation

2022 Restaurant Transactions
2023 Restaurant Transactions
Visualization

Monthly and YTD Revenues


Comparing restaurant revenues month by month for 2016 and 2017, as monthly revenues and as YTD revenues.

YTD = Year To Date means the sum of revenues up to the current month.

Transactions from 2022 are saved in an Excel file, while transactions from 2023 are saved in a Google spreadsheet (which we made public for this example). So, we use an Excel Reader node to read data from 2022 and Google Sheets nodes to access the data for 2023. To access the Google spreadsheet, you are supposed to provide authentication for your Google account. Do not worry, authentication happens and remains at Google. Nothing will be stored with the KNIME workflow. After accessing the data:

  • we extract parts of the date&time objects for each invoice,

  • we perform a monthly aggregation with the Pivot node

  • we calculate the YTD values with the metanode "YTD"

  • We then concatenate/join the values for 2022 and 2023 and

  • We visualize them in bar chart (monthly) and line plot (YTD)

Notice that we could have performed all aggregations within the bar chart node. However, for large amounts of data the loading (and refreshing if in a data app) of the views might take long time, since at each refreshing all totals must be recalculated. So we opted for pre-calculated values before visualization.

Aggregations: Monthly and YTD
YTD Revenues
YTD
changecolumn (month)order
Column Resorter
changecolumn (month)order
Column Resorter
Sum as Double
String Manipulation
YTD revenues
Line Plot
Create connection to Google Sheets service
Google Sheets Connector
2022 data
Excel Reader
monthly revenues
Bar Chart
Extract yearand month
Date & Time Parts
Joiner
Year as String
String Manipulation
YTD Revenues
YTD
connect to Google with your user credentials
Google Authenticator
Extract year and month
Date & Time Parts
rename aggregated column with year
Column Renamer
Number Rounder
Public Access to Google Sheet with 2023 data
Google Sheets Reader
monthly revenues
Pivot
monthly revenues
Pivot
rename aggregated column with year
Column Renamer
Concatenate

Nodes

Extensions

Links