How To Group Weeks in Salesforce Report

In this Salesforce tutorial, we will learn to Group Weeks in the Salesforce Report. We will create a custom report in Salesforce Lighting and Salesforce Classic, where we will group the date of records in the week format.

What is Group Weeks in Salesforce Report

In Salesforce groups, weeks refers to a feature in Salesforce reports where we can group the report data based on week dates. Grouping the data in a weekly format helps in observing the changes that occur every week.

For example, in the Opportunity object, we have a date field Created date, and when we group this date in week format then we can view the record of created opportunities in week date format like 07/01/2024 to 13/01/2024.

Group Weeks in Salesforce Lightning Report

In this example, we will create a Leads report, and there I will explain how we can group the records in a week format, where we will filter the records with the date field Created date and later sort these records in week date format.

You can also select any other object and follow the same steps to create a report and group it by week.

Follow the below steps to create a custom report in Salesforce Lightning.

1. In the Sales application of Salesforce Lightning, click on the Reports tab, and if you are not able to find the Reports tab, then click on the App Launcher (9 dots) and search, then select Reports.

Salesforce Group reports by week in Lightning

2. In the Reports window, click on the New Report button to create a report.

3. In this window, select the category as Leads, then in Report type name again, select the option Leads.

After this click on the button Start Report.

Group weeks in a Salesforce Report

4. In this step, we will apply filters to generate records on the report table, and for that, click on the Filters tab in the left sidebar and the filters below.

  • In the Show Me field, select the option All Leads.
  • Select the Date field as Create Date, then select the Range as All time.
See also  How to Filter Multiple Value in Salesforce Report

You can select the Date and Range according to your requirements.

Salesforce Lightning group reports by week

5. After applying the filters, click on the Outline tab in the left sidebar.

In the field Group Rows, search and select Create Date. You can select any other date field also for grouping rows.

Create a report grouped by weeks in Salesforce

6. Now, we can see that rows are grouped by the selected date field Create date.

Click on the dropdown of the Create date and select Group Date By -> Calendar Week.

Group record by week date in salesforce lightning

7. As we can see the group row Create date is group in week date format. Now click on the button Save & Run to save this report.

Group Reports by week in Salesforce Lightning

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

  • In the Report Name field, enter the relevant name for the created report. In this example, I have entered the report name as Weekly Created Leads.
  • The Report Unique Name will be auto-filled according to the entered report name.
  • Select the Folder to save this report. In this example, I have selected the folder Public Reports to make this report visible to all users.
  • At last, click on the Save button.
Salesforce Lightning Lead report grouped by week

9. As we click on the Save button, the report will be saved in the selected folder, and the report will run in the next window where we can view all records as shown in the below image.

Lead report grouped by week in Salesforce

In this way, we have successfully created a report by grouping in a week in Salesforce Lightning.

Group Weeks in Salesforce Classic Report

In this example, we will create a report on the opportunities in Salesforce Classic, and there, I will show you the group weeks in that report. In this example, we will select a date field, Close Date, and later, we will group this date field in a week format.

See also  How to View Scheduled Reports in Salesforce

To create a custom report in Salesforce Classic follow the below steps.

1. If you are logged into the Salesforce Lightning edition, then switch to Lightning edition, and for that, click on the settings icon in the dropdown and select the option Switch to Salesforce Classic.

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

3. In the Reports & Dashboards window, click on the button New Report.

4. In this window, select the Report type as Opportunities and click the Create button.

Salesforce Classic Create a report with Group week date

5. In this step, go to the Filter section and apply the following filters to generate records.

  • In the Show field, select the option All Opportunities and select the Opportunity Status as Any.
  • In the Date field, select a date field to filter results. In this example, I have selected the date field Close Date.
  • At last, select the range as All Time.

You can modify the above filters, date field, and range according to your requirements.

Create a report grouped by weeks in Salesforce Classic

6. After applying the filter, we have to change the table format to add a group row, and for that, click on the dropdown Tabular Format and select the option Summary.

Group Reports by week in Salesforce

7. To add a date field as a group row, go to the left sidebar, and from there, drag and drop the date field to the region. Drop a field here to create a grouping.

In this example, I have added the date field Close Date as a group row.

Group Reports by week in Salesforce Classic

8. After adding the date field as a group row, click on the dropdown of the date field then select Group Dates By -> Calendar Week.

Arrange report date in group week in Salesforce

9. On applying the above filters, the Group row will grouped according to the week date as shown in the image below.

See also  How to add a Dashboard to an app page in Salesforce

Now click on the Save button.

Group weeks in a Salesforce Classic Report

10. In this window, enter the following details to save the report.

  • In the field Report Name, enter the name of the report. In this example, I have entered the report name as Weekly Closed Opportunities.
  • The field Report Unique Name will be auto-filled according to the entered Report Name.
  • In the field Report Folder, select the folder to save this report. In this example, I have selected the folder Unfiled Public Reports.
  • At last, click on the Save and Run Report button.
Salesforce Classic Opportunities Closed by week report

11. Now, the 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.

Group Weeks in Salesforce Classic report

As we can see in the above, records are grouped by Week date. So now we have successfully grouped the dates in the week in the Salesforce Classic report with the help of the above example.

Conclusion

In this Salesforce tutorial, we have learned to Group Weeks in the Salesforce Report. In the above examples, we created custom reports in Salesforce Lightning and Salesforce Classic editions, where we grouped the data by week.

You may like to read: