Blog

You may have the requirement to report by month and year. If you have tried that, you will find that the standard reporting features may not provide you with what you are looking for.

Lets say that you would like to report on the number of closed opportunities over the last 3 years. You would like to have months reported along the top in columns and the years down the side in the rows. The report will just include the number of opportunities closed in each of the months.

You work out you need a matrix report and need to group by close month for a column grouping and close date for the row grouping. You also work out you need to use the ‘Group Dates By’ feature of ‘Calendar Month’ for the Close Month and ‘Calendar Year’ for the Close date row grouping.

Calendar Month Grouping

Salesforce Opportunity Reporting group by Calender month

Calendar Year Grouping

Salesforce Opportunity Reporting group by Calender year

Your first attempt may look something like this:

Salesforce Opportunity Reporting by Year and Month

Then you realize you need to do a little more work. The problem is that while the report is grouped by calendar month, it is not exactly what you had in mind. It is grouping by every month of every year that is being reported. You had wanted to just see January to December as months in the columns, but it is reporting on each month from January 2012 to December 2014.

To improve this, we can add a formula field to the opportunity object, that will calculate the month that the opportunity closed date is in, and then we can use this for reporting.

Salesforce Opportunity Reporting Close Month Formula

Now we can replace the column grouping with our new field, and here is the result:

Salesforce Opportunity Reporting by Year and Month 2

The last thing you may want to do is to create a dashboard, that shows graphically the number of opportunities per month and groups by year, so it is possible for example, to compare the number of closed opportunities in January 2012 to January 2013 and January 2014. While we were able to use the ‘Group Dates By’ feature in the matrix report, this isn’t available in a dashboard. To deal with this, we need to create another formula field that will return the year of the close date. Here is the formula:

Salesforce Opportunity Reporting Close Year Text

Note it is a text field. If we used a numeric field, then the years would be formatted as numbers e.g. 2,014.

Now we have our Year calculation we can use it for the row grouping, and our report now looks like this:

Salesforce Opportunity Reporting by Year and Month 3

And with that, we can create our dashboard using our report as the data source. In the component date, we set the X axis to the Close Month and Group by to the Close Year.

Salesforce Dashboard Component Group By

Now finally we have our dashboard, where we can compare the number of opportunities closed by month and year.

Closed Opportunities Dashboard

What Certification are you studying for now?

Focus on Force currently provides practice exams and study guides for sixteen certifications

Reporting by Month and Year with Salesforce Reports

You may have the requirement to report by month and year. If you have tried that, you will find that the standard reporting features may not provide you with what you are looking for. Lets say that you would like to report on the number of closed opportunities over the last 3 years. You would like to have months reported along the top in columns and the years down the… Read More

Reporting by Month and Year with Salesforce Reports

What can you do with SalesforceA

SalesforceA was released in Spring 14 to allow Salesforce admins the flexibility to do routine user management on their mobile device. If you have ever had to immediately inactivate a user, or had to response ASAP to a user that has locked themselves out and needs a password reset, then this app will come in handy. Here is our review of what you can do with this app, what’s good… Read More

What can you do with SalesforceA

Salesforce Sandboxes

What is a Salesforce Sandbox? Although it is very easy and possible to make changes directly to configuration in Salesforce, it is a better idea to test out those changes in another environment which won’t affect your users. That’s why Salesforce includes a ‘sandbox’ for every production organisation where changes can be made and tested before moving them to production. This type of environment is called a sandbox. The number… Read More

Salesforce Sandboxes

Salesforce Quotes

Once you have added your products into an opportunity, Salesforce has inbuilt functionality to allow you to generate and email quotes to customers. Lets take a look at how this works, and what you need to be aware of when using Salesforce Quotes. First, to use Quotes they need to be enabled. By default the are not enabled and you won’t see them in your Opportunity screen. Go to: Setup… Read More

Salesforce Quotes

Salesforce Jobs

Salesforce Administrator After Salesforce is implemented, a Salesforce administrator is required to maintain and extend the system functionality as business needs change, evolve or expand into new areas of the business. The role is a varied one but will typically include some or all of the following: • Provide User Support and be responsible for user administration • Investigate and resolve problems • Investigate and analyze requests for change and… Read More

Salesforce Jobs

Salesforce Basic Terminology

If you are new to the Salesforce.com application, you may wonder ‘What exactly is Salesforce.com’ and before long you will come across some terminology that is used to describe different parts of the application, functionality and navigation.Here is a quick guide to some of the basic terminology you need to understand Salesforce.com and navigate the application.Basic SalesforceSalesforce is the name of the company and name of the application. It started… Read More

Salesforce Basic Terminology

Subtract Two Date Fields to Calculate Duration of Time

If you are faced with the challenge of calculating the duration of time between two dates in Salesforce, this post is for you. Lets say what you want is to take two dates and times, for example 20/01/2014 09:00am and 21/01/2014 10:20am and calculate the duration of time between them in hours and minutes, and display the result like this: 24:20 or 24h:20m.If we just create a formula field and… Read More

Subtract Two Date Fields to Calculate Duration of Time

Salesforce Roll-up Summary Using the Value of a Formula Field

Roll-up summary fields are a very useful Salesforce feature, but you may come across a situation where you need to rollup the value of a formula field. Here is an example: You have added a custom field to the Product object to record the cost of a product. You want the total cost of all products added displayed on an opportunity. In the screenshot below you can see Widget A… Read More

Salesforce Roll-up Summary Using the Value of a Formula Field

Saving Emails to Salesforce

If you use Gmail or another web based email service, Salesforce has a feature that will allow you to save your emails related to leads, contacts and open opportunities. It is the ‘Email to Salesforce’ features and when enabled, allows users to bcc a unique bcc email address to automatically create activity records against records in Salesforce. To use this feature, firstly the Salesforce Administrator has to enabled it, and… Read More

Saving Emails to Salesforce

Comparing Salesforce Editions

There are a number of editions of Salesforce offering varying features and capabilities. If you are new to Salesforce and deciding which edition is right for you, then this guide will be helpful. If you already have Salesforce it will be useful to know what features you can take advantage of and any limitations you will have. It is of course possible to upgrade to a higher edition. If you… Read More

Comparing Salesforce Editions

Salesforce Search Layouts

Salesforce gives up the ability to customize many areas of how it displays data. One area that is important to understand but easy to overlook is search layouts. Search layouts allow us to customize the fields both standard and custom that are displayed in various results lists. It is worth the time to customize, as it can improve productivity by ensuring that the most useful fields are displayed in the… Read More

Salesforce Search Layouts

Salesforce Instances vs Orgs vs Environments

Once you start getting involved with Salesforce, you will hear a number of terms such as Instance, Org, Environment and even POD. Its easy to get these confused or even not to even be aware of what they really mean. One person may refer to the development instance and another the development environment. Some organisations may refer to the fact that they have multiple instances of Salesforce, and another multiple… Read More

Salesforce Instances vs Orgs vs Environments

What is the Salesforce Account Hierarchy (And How To Use it)

The Salesforce account hierarchy allow accounts to be related in a hierarchy by using a ‘parent account’ field to link them together. Once linked, the complete hierarchy structure can be viewed and links are provided to navigate directly to the accounts.The first step is to create or identify the ultimate ‘Parent’ account. This is the account at the top of the hierarchy. In our example, the top level account is… Read More

What is the Salesforce Account Hierarchy (And How To Use it)

Data Loader Tips – Inserting or Updating Blank Values in a Field

You may have come across the situation where you need to use Dataloader to clear or delete the value of a field. Normally, if you provide a blank value in the input file, DataLoader will ignore it and leave the field value as is. Lets look at an example. Here we have loaded data into the Product Description field instead of the Product Code field. Lets imagine, instead of 3… Read More

Data Loader Tips – Inserting or Updating Blank Values in a Field