0
0
Google Sheetsspreadsheet~8 mins

YEAR, MONTH, DAY extraction in Google Sheets - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - YEAR, MONTH, DAY extraction
Dashboard Goal

Understand how to extract the year, month, and day from dates in a spreadsheet to analyze sales data by these time parts.

Sample Data
DateSales
2024-01-15150
2024-02-20200
2023-12-05180
2024-01-30220
2023-11-25170
2024-02-10210
Dashboard Components
  • Year Column: Extract year from Date using =YEAR(A2). Shows the year for each sale.
  • Month Column: Extract month number from Date using =MONTH(A2). Shows the month number (1-12).
  • Day Column: Extract day number from Date using =DAY(A2). Shows the day of the month.
  • Total Sales by Year: Sum sales grouped by year using =SUMIF(C$2:C$7, E2, B$2:B$7) where column C has the extracted years and column E has unique years.
  • Total Sales by Month: Sum sales grouped by month using =SUMIF(D$2:D$7, G2, B$2:B$7) where column D has the extracted months and column G has unique months.
Dashboard Layout
+----------------------+---------------------+
|      Data Table      |  Extracted Columns   |
|  (Date, Sales)       | Year | Month | Day  |
+----------------------+---------------------+
|                      |                     |
+----------------------+---------------------+
| Total Sales by Year   | Total Sales by Month |
+----------------------+---------------------+
Interactivity

Filtering the data table by date or year updates the extracted columns and the total sales summaries automatically. Selecting a specific year or month filters the sales totals to that period.

Self Check

If you add a filter to show only sales from 2024, which components update?

  • The extracted Year, Month, and Day columns show only 2024 dates.
  • Total Sales by Year shows only 2024 total.
  • Total Sales by Month updates to show sales totals for months in 2024.
Key Result
Dashboard shows how to extract year, month, and day from dates and summarize sales by these parts.