Goals are quite often an overlooked part of Dynamics 365’s functionality as they can be a bit complicated to set up if you aren’t sure how all the entities work together.

Today we are going to try and remove some of the confusion surrounding goals by taking a look at what they are, what they can do for you and how to create them.

A goal actually consists of 3 main parts, a goal metric which defines what is being measured, a roll up query which determines what records to include in our goal, and finally the goal itself which is used to define the target.

Goal Metric

Let’s start by looking at a goal metric, when creating a new metric we can see that we can define a metric type, the two options being Amount or Count.

Selecting Amount, allows us to sum up a value on our records, for example we might want to measure the value of our opportunities or the quantity of a specific product being sold.

If we select Amount as our Metric Type we then need to define our Amount Data Type, so at this point we need to know the data type of the fields we are going to be measuring.

For our opportunity example we would want to select Money, as the fields that we would be measuring are the revenue fields, which on the opportunity entity are currency fields, but we could also select decimal or integer for any other numeric type fields we might want to measure, such as quantity for example.

Alternatively we can select count as our Metric Type which would enable us to count the number of records as our metric, so this might be useful for counting the number of phone calls made or leads created.

Rollups

After saving our metric record, we can then add our rollup fields to it. The rollup fields define the record type, field and states that will be used to calculate the metric. Typically we would want to define a rollup field for measuring the actual or achieved metric and a rollup field for measuring the metric in-progress.

This will later allow us to show whether or not a goal is on target to be achieved within a given time period.

So let’s create our first rollup field for measuring the actual opportunity revenue achieved:

In step 1 let’s select Actual as our Rollup Field.

And in step 2 we can define the record type and source field, which in our example would be opportunity and  Actual Revenue respectively.

In this step we can also define the status that the records need to be in, in order to be counted towards the metric calculation. For the actual calculation, we only want to include opportunities that are in a status of won, so let’s select that in the source record type state field.

Finally in step 3, we need to define the date field that will determine when to include the record in the metric calculation, for our actual calculation this will be when the opportunity is won, so here we can select the actual close date field.

Good, so with our actual rollup field defined, let’s repeat the process for our In Progress rollup field:

Let’s select In Progress in our rollup field, our source record type is still opportunity, but this time our source field will be the estimated revenue for our opportunity, and the source record type state that we want to include will be the Open opportunities.

And for our date field, the date we expect the opportunity to be closed, which is our estimated close date field.

So with our goal metric and rollup fields now defined, we can use this to create our goals, so let’s do that now.

Goal

Let’s start by giving our goal a name, and selecting the goal metric we previously created. We also need to give our goal an owner, now if this goal is for a specific individual the goal owner should be set to this user.

The time period allows us to set the date boundaries in which our rollup field date values on our metric need to fall in order to be counted towards this goal. As you can see we can define this as a fiscal period as defined in the system settings, or as a custom period where we can define our own from and to dates.

The target is where we define the target value for this goal, as our metric is totalling up currency fields on the opportunity entity this target is a monetary value. If our metric was defined as a decimal or integer a corresponding target field would be available.

The goal criteria section, allows us to define additional criteria for rolling up records to be counted towards our goal.

For example “Roll Up Only from Child Goals” allows us to define this goal as a parent goal which aggregates the data from goals associated to it as a child goal. This is really useful when defining goals for individuals and an overall goal for a team or organisation.

With the “record set for rollup” field, you can select whether or not the records being rolled up should be owned by the owner of this goal or whether or not it should just roll up all records that match the criteria set out in the goal metric and time period, again giving you the ability to define an organisation goal, or a goal for a specific individual.

The rollup query fields for both actual and in-progress enables you to define even greater filtering on the records included in the goal calculation. For example, we may want to only include opportunities for customers within a certain industry. This can be defined as a rollup query in a similar way to defining a personal view, but the query can then be applied to our goal to only include those records defined by the query.

Now with our goal defined, we can wait for the system to calculate our actual and in-progress values which occurs periodically. Or if we want to hurry the process along, we can click the recalculate button on the command bar.

So with our goal now defined, how can we visualise this data to see how we are doing against our target.

Well there are several charts available out of the box for goals, so let’s check out the goal progress chart.

As we can see here I am a little behind on hitting my target. The blue bar represents what I have achieved so far, and the orange bar represents what I have in progress.

My actual bar should be sitting closer to the dark blue circle, which is where I should be today if I am going to hit my target by its end date, and my end goal is the light blue diamond at the top of the chart, which ideally is where my in progress bar should be sitting, so I better get to work on finding a few more opportunities.