---
title: "Create a Metric similar to TODAY() in Excel"
slug: "create-a-metric-akin-to-today-in-excel"
updated: 2025-11-24T15:31:31Z
published: 2025-11-24T15:31:31Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://kb.pigment.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Metric similar to TODAY() in Excel

In some situations, you might need to calculate something based on the current date. The [Metric to Metric import](https://community.gopigment.com/importing-and-exporting-data-95/metric-to-metric-importing-1561) functionality allows you to build a Metric in a Pigment Application that holds today's date and updates automatically each night. This article explains how to set this up.

You can use the final Metric for multiple calculations or as a variable to automatically update the page selectors of your Boards. A few examples of use cases are listed below:

- Update page selector with a [dynamic variable](https://community.gopigment.com/modeling-formulas-85/item-variables-610?tid=610&amp;fid=85#Member+Based%C2%A0and+Dynamic+Variables%C2%A0) connected to the Today Metric
  - From the **Today** Metric you can calculate a **current month** Metric and connect that to your application variables. This will enable you to automatically update Board page selectors or Calculated items which will always show the current month.
- Calculate with time
  - In some use cases you want to see a reference to **today**. For example you would like to show how much you are overdue on a project end date or you want to calculate the amount of days that an employee is working. With the **today** Metric you can calculate this easily and it will update automatically.
- Filter in datasets
  - Another use case is to filter datasets. Maybe you would only like to see the most recent three months of transactions? Leveraging the **today** Metric will allow you to do that without any manual interference.

**How to set this up:**

1. Create a Dimension called **Import******and add 1 Item called **“1”**
  - Note that you can also use any other existing Dimension as long as it has 1 Item and will not change. You need this Dimension to be able to run an import in step 4 as you can’t import into a Metric with no Dimensions.

![wXD9LGUyinnJppNHlovNTdJwUpvwRCoLPReEX6YamaT8__eYQbG3OJh1946Ku0AYrTkn6FJXcSN-w6p6eZevvqmK8BNWuyMcQ_Ss7YuC2EnA6eCSmaOn-yRTj63DmSD1fgEGz1jUnHJNWwjzOReEXHA](https://lh7-us.googleusercontent.com/wXD9LGUyinnJppNHlovNTdJwUpvwRCoLPReEX6YamaT8__eYQbG3OJh1946Ku0AYrTkn6FJXcSN-w6p6eZevvqmK8BNWuyMcQ_Ss7YuC2EnA6eCSmaOn-yRTj63DmSD1fgEGz1jUnHJNWwjzOReEXHA)

1. Create a date-formatted Metric with the name **Today** and add the Dimension **Import******to it
  - Fill the cell manually with **yesterday's** date (you will update the date to today's date in step 4)

![09OjfPwcoiQHeNCu2lgY__vvywz9lJThC1udv3Xgk8EtX_rc0eX66RBPlPZnWxBIuajCmaqHHrFMxEfqRPkrpDyR4Ih1eMVIv9HqwradPHS27F3OwIbsO0bY7yqmYvaazik827agx4uOoCUlf3BFxpE](https://lh7-us.googleusercontent.com/09OjfPwcoiQHeNCu2lgY__vvywz9lJThC1udv3Xgk8EtX_rc0eX66RBPlPZnWxBIuajCmaqHHrFMxEfqRPkrpDyR4Ih1eMVIv9HqwradPHS27F3OwIbsO0bY7yqmYvaazik827agx4uOoCUlf3BFxpE)

1. Create a date formatted Metric with the name **Tomorrow******and add the Dimension **Import******to it
  - Apply the following formula: *Today +1*

![QgRv_EnmBxGiGNU50jVdznW10r5kgFgzqVU1ocp8heevbGBq7Gizg8l9nxbLxh_pLABcPH3HR3jDLjXBj72teb_WlGr67KadHHhHlvCkH6AYz5B9t3c2E291kSch5iGY1y7_jyRDYsTnQlNqCOvhjZ4](https://lh7-us.googleusercontent.com/QgRv_EnmBxGiGNU50jVdznW10r5kgFgzqVU1ocp8heevbGBq7Gizg8l9nxbLxh_pLABcPH3HR3jDLjXBj72teb_WlGr67KadHHhHlvCkH6AYz5B9t3c2E291kSch5iGY1y7_jyRDYsTnQlNqCOvhjZ4)

1. Setup a Metric to Metric import from Tomorrow -> Today
  - Make sure you **save******the import configuration and choose to **clear existing values**

![hB7J3LpveFm_cwGSa1yU8j46mG4KUePdxoImqbJYXDATO8eLhYQtuiFAn9vycIpOkkAyct8F42jldhVJMNJ3P6n-ZhWCbhmrbU0CviDnBvQkRonNjzXEPr27liM1kITARU_9MG7MhwOMAiTPFHRm8l8](https://lh7-us.googleusercontent.com/hB7J3LpveFm_cwGSa1yU8j46mG4KUePdxoImqbJYXDATO8eLhYQtuiFAn9vycIpOkkAyct8F42jldhVJMNJ3P6n-ZhWCbhmrbU0CviDnBvQkRonNjzXEPr27liM1kITARU_9MG7MhwOMAiTPFHRm8l8)

1. Schedule the import to run every night at 00.01 in your preferred timezone.
  - Set yourself or any other admin user as the designated user to receive an email in case there is an error message on the import

![Hz5Namp6oXbvRGEP64TtDvqn-kTj5R8lduCi_Q8aIGSv9MR4mVta4xqMbA1x44USL9O9IRXCfyQDyPTpghEB-rVtR_cvRC7UxEDNucXPVbYxSM9IfK6tlbu0xZwrNm2Hpse9pKFQB0O4Acrtba79iV0](https://lh7-us.googleusercontent.com/Hz5Namp6oXbvRGEP64TtDvqn-kTj5R8lduCi_Q8aIGSv9MR4mVta4xqMbA1x44USL9O9IRXCfyQDyPTpghEB-rVtR_cvRC7UxEDNucXPVbYxSM9IfK6tlbu0xZwrNm2Hpse9pKFQB0O4Acrtba79iV0)

Now your **today** Metric will always contain the current date and you can build any type of calculation or report based on it! If you want to reference your **today******Metric in another block make sure you remove the **Import******Dimension by using the [REMOVE modifier](https://community.gopigment.com/functions-84/remove-modifier-220) in your formula. An example below shows how to calculate the current month by using the formula [Timedim](https://community.gopigment.com/functions-84/timedim-function-137?tid=137&amp;fid=84): *timedim(Today [remove first: import], month)*

![Pw_OxwlNg8GsqH5yAOwVzyBxE1Z64xAYNtq83U6Y8nwxQsCw430wDkkC9MejYAhKXW7qSHtNVKmy0uUmrtfSHCCbmGAUweMN5iarsXIZ52bHqHxwmfRhZCzD-E3oTofYlQ4jJsuFaJ8nU_FNYZjGFKA](https://lh7-us.googleusercontent.com/Pw_OxwlNg8GsqH5yAOwVzyBxE1Z64xAYNtq83U6Y8nwxQsCw430wDkkC9MejYAhKXW7qSHtNVKmy0uUmrtfSHCCbmGAUweMN5iarsXIZ52bHqHxwmfRhZCzD-E3oTofYlQ4jJsuFaJ8nU_FNYZjGFKA)
