---
schema_version: "1"
id: 3097a1085308ddce7181fcfcb387aad806a361e1d2902ca8f06e5176078d75a8
title: Bucket a Date Field in a Recipe
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/analytics/264-0-0/bi_integrate_data_prep_recipe_bucket_date.md
canonical_url: https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_data_prep_recipe_bucket_date.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 84260b2b289a680bccfc6ba91e7a6fe0547096aec99d86cd823fd285f0a7156c
description: Add a field to a recipe to bucket values in a specified date field.
products:
  - CRM Analytics
  - Cross Cloud
release: "264"
---
# Bucket a Date Field in a Recipe

Add a field to a recipe to bucket values in a specified date field.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in Salesforce Classic and Lightning Experience.</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available with CRM Analytics, which is available for an extra cost in <strong>Enterprise</strong>, <strong>Performance</strong>, and <strong>Unlimited</strong> Editions. Also available in <strong>Developer</strong> Edition.</td></tr></tbody></table>

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small permission">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="colgroup" class="slds-cell-wrap" colspan="2" style="text-align:center;vertical-align:top;" id="d22028e47">User Permissions
              Needed</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="User Permissions Needed" class="slds-cell-wrap" style="vertical-align:top;" headers="d22028e47 ">To create a recipe:</td>
            <td class="slds-cell-wrap" style="vertical-align:top;" headers="d22028e47 ">Edit CRM Analytics Dataflows OR Edit Dataset Recipes</td>
          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_note.png)

Note To bucket date values in a Data Prep recipe, see [Categorize Date Column Values into Buckets](https://help.salesforce.com/s/articleView?id=analytics.bi_integrate_recipe_transformation_bucket_date.htm&release=264.0.0&type=5 "In CRM Analytics, Data Prep provides transformations that allow you to prepare, clean, and transform your data. For example, you can use a transformation to create a calculated column based on a formula. You add transformations inside a Transform node. You can string together multiple transformations to manipulate data sequentially.").

A bucket field lets you create new values based on existing values in another field. For example, use a bucket field to categorize support cases according to the season they were opened.

1. On the column header of the date field you want to bucket, click ![Column menu button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_replication_actions_button.png), and then select **Bucket**.
    
    Bucket settings appear in the Add Transformation panel below the preview data. The default mode is Absolute, which lets you specify a date range and name for each bucket.
    
    ![Date bucket dialog](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_integrate_data_prep_recipe_bucket_date_absolute.png)
2. Enter a start date and end date for Bucket1, and enter a name for the bucket.
    
    In this example, you want each bucket to be a season, so you enter the date range for winter and enter the bucket name.
    
    ![Date range for winter in bucket field](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_integrate_data_prep_recipe_bucket_date_absolute_winter.png)
3. To add more buckets, click ![Add bucket button](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/resources-global/analytics/images/bi_integrate_data_prep_recipe_add_filter_condition_button.png) and repeat step 2.
4. To bucket remaining values that you have not bucketed, select **Bucket remaining values** and enter a bucket for these values.
    
    If you don’t select this option, rows with unbucketed values keep the same value in the new bucket field.
5. When you have completed all the buckets, click **Add**.
    
    The new bucket field appears next to the source field in the recipe preview.
    
    ![Date bucket field in preview](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_integrate_data_prep_recipe_bucket_date_abs_result.png)

In Relative mode, each bucket is a period of time relative to the date that the recipe runs. You can create bucket periods based on days, weeks, months, quarters, or even years. For example, create a bucket field from the case created date to categorize cases by when they were opened.

![Date bucket relative dialog](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/bi/images/bi/bi_integrate_data_prep_recipe_bucket_date_relative.png)

When you create a relative date bucket field, manually enter the start and end of each period, or use the sliders.

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-analytics-bi-264-0-0-production-enus/ec791473-f5b4-4f64-a656-9104f455d966/images/icon_tip.png)

Tip You can use a bucket field to filter rows in a recipe.