[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-25。"],[],[],null,["# Set a date range for your report\n\n\u003cbr /\u003e\n\nControlling the timeframe of your reports helps you spot trends and focus viewers on specific periods of interest. As an editor, you can configure a report's default timeframe by setting date range properties in the report. You can allow report viewers to override these date range properties by adding a [date range control](/looker/docs/studio/date-range-control) to the report.\n\nTo set up a date range in your reports, complete the following steps:\n\n- [Select a date range dimension](#select-a-date-range-dimension) to provide the base date or date and time data.\n- [Set a default date range filter](#set-a-date-range-filter) to set the parameters of the date range.\n- [Set a comparison date range](#set-comparison) for component-level date ranges (optional).\n\nYou can set date range properties for an individual component, a group of components, a page, or the entire report.\n| **Tip:** As an editor of a BigQuery data source, you can also [use date parameters](/looker/docs/studio/use-parameters-in-a-custom-query) to pass date ranges to the underlying query.\n\nSelect a date range dimension\n-----------------------------\n\nA date range dimension is a field in your data source that contains valid date data. The data in this dimension determines the records that will be selected by the default date range filter. In most cases, Looker Studio automatically selects a date range dimension if one is available in the data source. However, if you have multiple date dimensions in the data source, you might want to change Looker Studio's selection. For example, if your data source has `order_date` and `ship_date` dimensions, you might want to change the default select from `order_date` to `ship_date`.\n\nTo select a date range dimension for a component, follow these steps:\n\n1. Edit your report.\n2. Select a chart or control.\n3. In the **Properties** panel, select the **SETUP** tab.\n4. In the **Data Source** section, click **Date range dimension**, and then use the dimension picker to select a valid date dimension. You can also use a valid date and time dimension, however, the time units are ignored by the date range filter.\n\n#### Select a report-level date range dimension\n\nTo set the date range for the entire report, follow these steps:\n\n1. Edit your report.\n2. Select the **File \\\u003e Report settings** menu.\n3. In the **Properties** panel, select the **SETUP** tab.\n4. In the **Data Source** section, click **Date range dimension**, and then use the dimension picker to select a valid date or a valid date and time dimension. \n\n#### Select a page-level date range dimension\n\nTo set the date range dimension for the current page, follow these steps:\n\n1. Edit your report.\n2. Select the **Page \\\u003e Current page settings** menu.\n3. In the **Properties** panel, select the **SETUP** tab.\n4. In the **Data Source** section, click **Date range dimension**, and then use the dimension picker to select a valid date or a valid date and time dimension.\n| The date range dimension must contain a complete date with year, month, and day. The data can come directly from your underlying dataset, or it can be the result of using calculated field functions.\n|\n| For some data source types, such as Google Ads and Google Analytics, the date range dimension is set automatically and cannot be changed.\n\nSet a default date range filter\n-------------------------------\n\nA default date range filter determines the default timeframe for a component. To set or change a default date range filter, follow these steps:\n\n1. Edit your report.\n2. Select a chart or control.\n3. In the **Properties** panel, select the **SETUP** tab.\n4. In the **Default date range filter** section, choose **Auto** or **Custom**.\n\n#### Set a report-level date range filter\n\nTo set a date range filter for the entire report, follow these steps:\n\n1. Edit your report.\n2. Select the **File \\\u003e Report settings** menu.\n3. In the **Properties** panel, select the **SETUP** tab.\n4. In the **Default date range filter** section, choose **Auto** or **Custom**. \n\n#### Set a page-level date range filter\n\nTo set a date range filter for the current page, follow these steps:\n\n1. Edit your report.\n2. Select the **Page \\\u003e Current page settings** menu.\n3. In the **Properties** panel, select the **SETUP** tab.\n4. In the **Default date range filter** section, choose **Auto** or **Custom**.\n\n### Auto date range\n\nChoose **Auto** to accept the default date range setting from the data source connector. The default date range setting varies by connector type. Some connectors, for example, Google Sheets and BigQuery, provide the entire range of dates contained in the underlying dataset. Other connector types limit the default date range. For example, the Ads, Analytics, and YouTube connectors provide the last 28 days by default.\n\n### Custom date range\n\nTo set up a custom date range filter, click **Custom** , then click the drop-down menu to open the calendar calendar_today. The calendar lets you configure two types of custom date ranges: fixed date ranges and rolling date ranges.\n\n### Fixed date ranges\n\nFixed date ranges specify static beginning and ending dates, for example, January 1, 2025 to April 30, 2025. Charts that use a fixed range always show data for the exact dates that you select.\n\n### Rolling date ranges\n\nRolling date ranges are relative to today's date. Rolling date ranges are like a window whose beginning and end dates change as time passes. To specify a rolling date range, select from one of the available preset ranges, such as **Today** , **Yesterday** , or **Last week (starts Monday)**.\n\nClick **This month \\\u003e** or **Last 7 days \\\u003e** to display additional preset options.\n\nLooker Studio defaults to starting the weekly rolling window on Sunday. You can change this to start on Monday by selecting **This week (starts Monday)** or **Last week (starts Monday)** in the date options list.\n\nSelect the **Include today** checkbox to include any data that has been collected so far for the current day (if applicable).\n\n### Advanced date ranges\n\nTo create more complex date filters, use an advanced date range.\n\nAdvanced date ranges let you configure custom date periods for both the current date range and the comparison date range. For example, you can create date ranges such as \"last 90 days from yesterday\" or \"last 52 weeks from last week\"; or you can compare the \"current 30 days to the last 30 days, aligned by day of the week\".\n\nTo configure an advanced date range, follow these steps:\n\n1. Select the component.\n2. In the **Properties** panel, select the **SETUP** tab.\n3. In the **Default date range** section, click **Custom** . Then click the calendar icon date_range.\n\n (To set the default date range filter for a **Date range control** , select the control and then click the calendar icon date_range.)\n4. Click **Advanced**.\n5. Set the **Start** date:\n - To make the start date a rolling date, select **Today**.\n - To make the start date a specific calendar date, select **Fixed**.\n - To make the start date a date in the past, select **Minus**.\n - To make the start date a date in the future, select **Plus**.\n6. Enter the **number** of date units.\n7. Specify what **date units** to use.\n8. Repeat steps 4-7 for the end date.\n9. Click **APPLY**.\n\n### Advanced date range examples\n\n**Example 1: Last 90 days from yesterday**\n\n**Example 2: Last 30 days from today**\n\n**Example 3: Next two quarters from this quarter**\n\n| **Tip:** To learn more about how to set up advanced date ranges in Looker Studio, try selecting a preset date range and then viewing how it is configured as a custom rolling date range. For example, configure your chart to use the **Last week (starts Monday)** preset range. Then, edit the range and select **Advanced** to see how it is set up as a custom rolling date range.\n\nSet a comparison date range\n---------------------------\n\nTo see how your data looks compared to a previous period, you can set a comparison date range. This option is available in time series charts and tables. In a time series, the comparison data appears as a line of a different color from the current data. In a table, the comparison data is shown as the delta from the current data, with an increase or decrease indicator.\n\nTo set a comparison date range, follow these steps:\n\n1. Select a time series, a table, an area chart, or a scorecard.\n2. In the **Properties** panel, select the **SETUP** tab.\n3. Go to the **Default Date Range** section.\n4. Under **Comparison date range**, choose the comparison period.\n5. Click **APPLY**.\n\n**Note:** While viewers and editors can use a **[Date range control](/looker/docs/studio/date-range-control)** to set the current period for a chart, only report editors can set the comparison date range.\n\n### Comparison period examples\n\n**Previous period / previous year examples**\n\nAssume today's date is January 1, 2019, and the selected period for the chart is **Last 7 days**:\n\nNow, assume today's date is January 2, 2019:\n\n**Advanced date comparison examples**\n\nCompare the last 30 days from yesterday to the 30 days prior to that, aligned by day of the week (for example, compare Monday to Monday):\n\nCompare year to date to two years ago:\n\nRelated resources\n-----------------\n\n- [How to handle date and time data in data sources and calculated fields](/looker/docs/studio/dates-and-times)"]]