*This feature, formally called Planning metrics, is included from the Pro Plan and up. **Reach out to our support team if you'd like to try it out.*

The Data Center **formulas** feature,** **along with the Data sets, is a smart scheduling tool that allows you to keep track of your planning needs.

Formulas represent the Data Center feature that helps you shape your data with mathematical operations. While the concept is based on simple operations with elements and data available on your portal, the result can be a complex custom metric tailored specifically for you and your organization.

# Creating Formulas

Formulas are very similar to Data sets when it comes to the way they are set up.

From **Reports** > **Data center **> **Formulas** > **Add formula**, and follow the same first steps:

give your formula an

**ID**: this is used to reference your metric in other formulas. Remember that an ID can only be written with uppercase letters and underscores (Planday will format your ID the correct way where necessary).give your formula a

**Description**: used to briefly explain what data it contains and what the formula means.choose if the Formula should be

**displayed in the Schedule**The main difference between a Data set and a Formula is the option to display it as a metric in your Schedule.

In the same view, you can set whether the data entered will apply to your entire Schedule, or whether they should be different per Department, Section or Position, by choosing to assign or apply your metric:

**globally**: the data is visible from every department, and is not influenced by the Department, Position, or Section selected for your Schedule view.**assign different values to individual departments**: the data is visible from specific departmentsThe 2 options for

**assign/apply different values to individual sections within a department**and**assign/apply different values to individual positions within a department**work in a similar way.

If you choose one of those 2 options, you also need to specify the Department.

More info about the basic elements of a metric can be found in the Data metrics article.

*When assigning your metric, you'll need to keep in mind that the components for gathering Schedule data used in your formula will be affected by what you choose.*

*Formula metrics can only calculate data for Sections and Positions in a department. If your formula will use actual values from your Schedule data do not assign it globally or to a Department.*

Once you click **Done**, you will find yourself on the advanced settings page for your **Formula**. This is where you can set up mathematical operations with:

data from your

**Schedule**(e.g assigned Shift hours or the total number of assigned shifts ),**Your available metrics**(more details here),and/or other

**Formulas**.

The top field is where you can create the formula for your metric.

*Please note, that you can only add and edit things in order: elements are always added at the end of the formula and editing always starts from the last element (or most recently added).*

To create your formula, simply type or choose the components you need. Those can be:

**numeric values****mathematical operators**from underneath the formula field.

"+" for addition

"-" for subtraction

"*" for multiplication

"/" for division

"(" and ")" to set the order of operations.

**your available metrics**, which lists IDs for all the metrics you have created previously.*This highlights the importance of choosing intuitive and explanatory IDs for your metrics, as this is the only information displayed.**For instance, from the 4 available metrics in the example below, the #SHIFTS_NEEDED ID is well set. In contrast, the #PAYROLL_SUPPLEMENT ID is not indicative of what kind of data it brings which can be anything from the actual amount added to the payroll to a percentage and could be set per hour or per shift.**Having good IDs can save you a lot of time.*

**Schedule data**, which provides a list of all the data that you can use. You can always find a component for Schedule data to make it match your operations and the other elements in your formula, with the many variations available.

For instance, if want to create a formula between 2 metrics with data per hour, you should choose the Schedule element that contains the data you need, listed hourly.

## Understanding the Schedule data available for Data Center formulas

All the Schedule data components contain information about shifts, in different states, and from the different levels of your Schedule. Here's the complete list:

You can also hover on top of any component for actual values from your Schedule to get a full explanation of what it will bring to your formula, as shown below:

Once you're familiar with the Schedule data available, you can also use the filters available to narrow down the list:

*Count*: filters based on whether the data should be gathered as**Shift hour count**or as**Shift count**.*Data gathering level*: allows you to choose whether the data should be grouped by**Department**,**Position,**or**Section**.*Shift status*: makes the distinction between the data based on**Open**, or**Assigned,**shifts.*Data displayed*: regardless of the data return type (how the data is collected and grouped), data can be displayed**Daily**or**Hourly.**

When no filter is applied (** None** is selected for all the filters), you will see the complete list. Similarly, when a filter is set to

**, it is simply not applied to your list.**

*None*As an example, the formula below has 3 parts:

a component for actual values for Schedule data, that is gathering the total number of hours in assigned shifts, by Department, per hour

the "-" operator

a self-made metric that contains the total number of hours worked (e.g. approved from Punch Clock entries).

This formula would then calculate the difference between the total number of assigned (shift) hours and the total number of actual worked hours, and show in the Schedule.

This can be useful if the number of hours worked depends on how many customers you have at a given time. This way you can quickly spot the periods where you might have scheduled too many employees or too few.

You will need to make sure that the components you use and the settings you applied when assigning the metric to departments and/or positions/sections inside the Schedule will match, so your metric calculations will appear in your schedule and show what you expect.

Think of the **Assign** option as an indicator for where the results of the formula will be displayed. With that in mind, you have to make sure that your formula is displayed in a place that matches the contents of the formula.

As a rule of thumb, formulas need to match the level of the lowest structural level contained in your metric.

The order is **Global** (or portal) → **Department** → **Section** → **Position**, following the structure used in Planday.

Once you've set up the formula, just click "Save", and your Formula is done.

**Need more help?**

Please search for answers in the 🔍 Help Center or watch our ▶️ video tutorials.

Contact our support team via the blue icon at the bottom if you have more questions.