How To Group Report By Dates in Salesforce

In this Salesforce tutorial, we will learn to Group Reports by Date in Salesforce. As we know, in Salesforce, we create reports in a big volume in the CRM. We are often required to sort out these reports on the basis of their status, category, and time range, like date, month, and year.

We will create a report that will be grouped by a date field like Created date, Closed date, or activity date, and we will create this report in Salesforce Lightning and Classic edition, respectively.

Group Report By Dates in Salesforce

In Salesforce, we have a feature to group the records by date, month, and year termed a grouping.

In grouping by date, we organize a group of data with date-related criteria. For example, group opportunities by Close Date to see closed opportunities or group cases by product to see the number of cases for each product.

When we group reports by dates in Salesforce, it is easier to sort and organize the data according to the date fields.

Group Report By Dates in Salesforce Lightning

In this example, we will create a report on Opportunities, and there we will group the records with the date field Created date.

To create a group-by-date report on opportunities in Salesforce Lightning, follow the below steps.

1. On the Sales application page, click on the Reports tab.

Salesforce Lightning Group reports by date

2. In this step, click the New Report button to create a report.

Group a report by date in Salesforce

3. A pop-up window will appear as we click on the New Report button. In this window, select the Category as Opportunity and Report type Names as Opportunities.

After this click on the button Start Report.

Group reports by date in Salesforce Lightning

4. Now to generate records on the report table, click on the Filters tab that is on the left sidebar.

See also  How to Filter Blank Values in Salesforce Report

In this example, I have filtered the records with the Created date and selected the Range as Current and Previous Financial Year.

Salesforce Lightning Group reports by date

5. After applying the filters, click on the Outline tab in the left sidebar bar, then in the Group Rows field, search and select the Date field Created date.

You can also select other date fields like Closed Date, Last Activity, and Last Modified Date.

Create a report grouped by date in Salesforce

6. In the report table, we can see that records are being grouped in the group column Created Date.

For better visualization, we will add a chart to this report, and to do that, click on the Add Chart button.

Add chart to a group date report in Salesforce

7. To view all records of the report table, we need to save and then run this report; for that, click on the button Save & Run.

Salesforce Lightning Create a report grouped by date

8. In this window, enter the following fields to save this report.

  • In the Report Name field, enter a relevant name for the report. In this example, I have entered the report name as Opportunities By Created Date.
  • The Report Unique Name will be auto-filled according to the entered Report Name.
  • In the Folder field, select the folder Public Folder so that all users can view this report.
  • At last, click on the Save button.
Salesforce Lightning Opportunities by date report

9. As we click on the Save button, the report will be saved in the selected folder and it will run in the next window, we can view all records of this report.

Opportunities by grouped date row in Salesforce lightning

In this way, we have successfully created an Opportunity report where we Grouped reports by dates in Salesforce Lightning.

Group Report By Dates in Salesforce Classic

In this example, we will create a custom report on the Accounts’ Last Activity date, and there, we will group the record in the date field Last modified date.

To create a report with records that are grouped by date, follow the steps below.

See also  How To Group Report By Year In Salesforce

1. Navigate to the Salesforce Classic version, and for that, click on the settings icon. Then, in the dropdown, select the option Switch to Salesforce Classic.

Group dates in Salesforce Reports

2. On the Home page of Salesforce Classic, click on the Reports tab.

3. In this window, click on the folder Accounts and Contacts, then in the dropdown, select Accounts. After this, click on the button Create.

Create a report grouped by date in Salesforce Classic

4. In this step, we will apply some filters to generate records on the report table. Go to the Filters section at the top and apply the following filters.

  • In the Show field, select the option All accounts.
  • In the Date field, select Last Modified Date.
  • Select the Range as All Time, or you can also select Custom Range according to your requirements.
Group a report by date in Salesforce Classic

5. To add a date field as a group row, we have to change the table format of this report, and for that, click on the Tabular format dropdown and select the option Summary.

Salesforce Classic Create a report grouped by date

6. After changing the tabular format, go to the left sidebar, then drag and drop the date field Last Modified Date to the region. Drop a field here to create a grouping.

Salesforce Classic Grouped by date report

7. Now, we can see the records are grouped in a row according to the date field Last Modified Date.

To make a better visual representation, we will add a chart to this report table, and for that, click on the button Add Chart.

Salesforce Classic create an Account report grouped by date

8. In the chart setup, select the Chart type, then select the X-axis and Y-axis, and last, click on the OK button.

Create a grouped by date report in Salesforce

9. After adding the chart, click on the Save button.

10. In this window, enter the below fields to save this report.

  • Enter the name of the report in the Report Name field. In this example, I have entered the Report Name as Accounts Last Modified.
  • The Report Unique Name will be auto-filled according to the entered Report Name.
  • In the Report Folder, select the folder to save this report. In this example, I have selected the folder Unfiled Public Reports to make this report visible to all users.
  • At last, click on the button Save and Run Report.
Salesforce Classic save Grouped by date report

As we click on the button Save and Run Report, the created report will be saved in the selected folder, and the report will run in the next window where we can view all records of the report.

See also  How to Filter Records Owned by Queue in Salesforce Report

In this way, we have successfully created a report with grouped dates in Salesforce Classic with the help of the above example.

Conclusion

In this Salesforce tutorial, we have learned to group reports by dates in Salesforce. In the above examples, we have created the custom reports in Salesforce Lightning and Classic, where we grouped the records of the report by date fields like Created at and Last Modified Date.

Along with this, we also learned about the grouping of the Reports by date in Salesforce and how it helps organize the records in Salesforce reports.

You may like to read: