Author: Robin Drinkall is a Certified Master Anaplanner with 9 years' experience in the finance industry.
Today() is an extremely useful function within spreadsheet / database applications that will return the current system date. This function is used very commonly seen and used extensively with general functions including switching from actuals > forecast, triggering conditional formatting and triggering events based on inputted dates. This function is not currently available as a formula within Anaplan, but there is a workaround that can be used to achieve the same result.
To set this up, you will require:
- Workspace administrator rights in each model you set this up in.
- CloudWorks access, and an integration user able to run the process.
The best way to achieve this is as follows:
- Create a non-production list in the system section called ‘Today’ — I usually use the ‘Organization’ list because it cannot be deleted and appears cleaner when not in use.
- Create a system module with two dated formatted line items, ‘Today’ and ‘Today + 1’. Today is an input with no formula and Today +1 has the formula Today + 1. Note when setting this up for the first time, you will need to manually enter today’s date into the Today input line item.
- Create a saved view within the system module using rows and columns rather than context.
- Create an import action from the saved view created in 3 into the today system module, mapping the system list to itself and then column headers for the line items. Within the Line items mapping, manually map Today + 1 into the Today line item.
- Create a process named ‘Today’ and add this action to the process. This can be manually triggered on a dashboard but realistically you might as well manually type in the date if you were going down that route – the better solution is to set up the process within Cloudworks.
- Navigate to Cloudworks using the drop-down menu top left of the screen, then head to ‘Integrations & Processes’, then ‘New Integration’, then Process.
- Give the process a name e.g. Data Hub Today, select the relevant workspace, model and the process created in step 5.
- Search for the new integration and on the sidebar select ‘Schedule’ then ‘Create Schedule. Select for the integration to run daily at 00:00 on your desired timezone:
- The following day, test that the date has correctly imported from Today +1 into Today/.
Things to note
- One of the best use cases for the today functionality is to track when a user (or the system) last uploaded a file. This can be achieved by importing the date into a table containing a line item for each data file and displaying this on a data management dashboard.
- Because the import window is 15 minutes, there’s a chance that a file upload could be holding the previous day’s date until 00:15. Ensure any overnight data loads that use the date are scheduled afterwards, or the action is put within the data load process itself.
- Note that this will need to be repeated in Cloudworks for each model and if using ALM it would need to be repeated for DEV / TEST / PROD within each model.
- You could theoretically do this process within the data hub and then create a processes to import the date within each spoke model (and schedule in Cloudworks using the same method) to avoid having to repeat the Today SYS module in each model.
- This process will not self correct — if the wrong date is entered initially or if a scheduled run fails then the incorrect date will carry forward. This should be occasionally checked to see that everything is flowing as expected.
- If a model is used by users across different timezones, ensure there is agreement as to when the ‘master’ timezone is to avoid confusion.
Questions? Leave a comment!