> For the complete documentation index, see [llms.txt](https://gchandra.gitbook.io/data-warehousing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gchandra.gitbook.io/data-warehousing/data-warehousing-concepts/types-of-dimensions/date-dimension-table.md).

# Date Dimension Table

<figure><img src="/files/rUhxkYMt5dLpeu5BQjZL" alt=""><figcaption></figcaption></figure>

\
In this example, the Date Dimension table contains information about dates, including the date itself, the year, quarter, month, day, and weekday. The "Date Key" column is the table's primary key and is used to join with other tables in the Star Schema.

This Date Dimension table can be joined with other fact tables in the Star Schema, such as a Sales Fact table, which contains measures such as total sales revenue, units sold, and discounts. By joining the Sales Fact table with the Date Dimension table on the Date Key column, it becomes possible to analyze sales data by date, year, quarter, month, and weekday. For example, it becomes possible to answer questions like:

* What was the total sales revenue for January 2022?
* What were the total units sold on Mondays in Q1 2022?
* What was the average discount percentage on weekends in 2022?


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gchandra.gitbook.io/data-warehousing/data-warehousing-concepts/types-of-dimensions/date-dimension-table.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
