Using Data Actions to Copy Data Within a Model

Objective

After completing this lesson, you will be able to create and run a data action to copy data within a model.

Copy Data Within Models

Data action with Copy Data steps allow you to copy data from one set of members to another, specifying options for filters and aggregation. For example, you can copy data for a product in one region to another product in other regions.

Every data action has a system-provided Filter for Version. The default version filter is the target version.

Using the scenario for this course, this short video will introduce the copy data step of a data action.

Aggregate To

When you define a copy action, the source distribution aggregation will also be copied. In the Aggregate To settings, you can override this functionality by specifying any dimensions that need to aggregate data differently than the source.

For dimensions that aren't included in the Aggregate To settings, the copied data will match the distribution of the source data by default. This behavior is similar to copying and pasting a cell with the Paste Details option enabled.

As an example, if you want to remove the distribution of data to different customers for privacy reasons, you can aggregate the data to the Unassigned member of the Customer dimension. In this case, all of the copied data is booked to the Unassigned member.

Depending on the Filter and Aggregate To settings, you may not need to add a copy rule:

  • If you want to copy the 2025 Forecast to a target version, then you only need to filter the step to the Forecast version and 2025.
  • If you want to copy the 2025 Forecast to 2025 and 2026 in the target version, then a copy rule is required.

Copy Rules

When choosing members for the copy action settings, you can use a parameter instead of dimension members to make your data action more flexible. Parameters can make it easier to update your data action, and they prompt you for values while running the data action.

The copy rule doesn't allow the use of version, so there are two key points to remember:

  1. Use a parameter for the source version. The source version parameter is then added to the context which will result in a prompt.
  2. Every data action will always prompt for the target version regardless of whether the target version prompt is in the filter or not.

Use Case: Copy Data by Year and Version Simultaneously

In the following example, the data action is set up to copy data by version and year at the same time, this year's actual data to next year's plan data. To copy data from one year to another and at the same time copy from the actual version to the plan version:

  1. The version filter must be set to the source version, for example, actual or a parameter for the user.
  2. The copy rule would then contain the source and target time values or parameters.
Example of a data action copy step

Options

When a copy action is executed, the default Write Mode action is to Overwrite the data. When defining the copy action, you have the option to change to Append (add) the data to existing values for the target members.

You can use Copy Factor if you want the system to multiply the copied plan data. Adding a number here means that the system will multiply the data by this factor when copying it, for example, if you know you need to increase data by 5%, then you change the copy factor so that the calculation happens as the data is being copied.

Using Auto-Generation Mode for "Date" determines how copy rules are applied to target members based on time dimensions. You can choose from the following options:

  • Detect Automatically chooses the most suitable mode automatically.
  • Day Granularity applies the copy rule based on the different number of days between members and takes into account leap years.
  • Week Granularity applies the copy rule based on the different number of days between members, but does not take into account leap years. Weeks are always calculated as being seven days apart.
  • Month/Year Granularity applies the copy rule based on the different number of months between members.

Running Data Actions

When Data Action Starters are added to stories, they appear as buttons with labels and can be configured using the right side panel.

Data action starter selected with the right panel showing configuration options.

Parameters

You can add parameters to prompt users for values while running the operations, and to make them easier to update and reuse.

The prompts are based on the parameters that were added to the data action when it was created. In a story, these are the Input options:

  • Prompt
  • Fixed Value

If you choose the Prompt type, there are four Value options:

  1. Custom Value
  2. Default Value (based on the default value set in the data action configuration)
  3. Story Filter
  4. Input Control

Prompt values can be set explicitly, or by retrieving values from the filters applied to the data.

Parameters for the Data Action Trigger (push button)

Running a Data Action from a Story

When a data action is run by selecting the push button in the story, a prompt dialog allows dynamic member selection.

Data Action starter selected opening the run dialog

Running in Background

If the data action is set to always run in the background, or if you select Run in Background after starting it, then you'll return to your story. You can keep working with your story but you'll have to wait until the data action finishes to make changes to the same version and you may need to refresh to see the results.

A message appears when it’s complete or you can check the Job Monitor or your Notifications list for the results.

Builder panel showing Always run in background deselected.

Publishing

Data actions can be set up in stories to automatically publish data, so that planners don't have to publish the data in a separate step. However, if a data action is configured to not publish automatically, then the data can be reverted.

There are three publishing options:

  1. Do not publish.
  2. Publish and fail if there are warnings.
  3. Publish and ignore warnings.

    If there is an issue with some records but not all, this option will process the good records.

Create a Data Action and Run it in a Story to Copy Data within a Model

Business Scenario: In the second step of the process, you need to copy last year's Actual labor hours and labor rates into your private planning version to start your labor forecast.

As a planning data administrator, you create a data action to copy data within the HR model. It will contain parameters for version and year.

Once you have created the data action, you will add a data action starter to the story and run it to copy the actual hours and labor rates into your private planning version.

 

Task 1: Create a Data Action to Copy Data within a Model

Task Flow: In this practice exercise, you will:

  • Create a data action to copy within a model.
  • Create the data action parameters.
  • Create a data action copy rule and filter.

Task 2: Run a Copy Data Action in a Story

Task Flow: In this practice exercise, you will:

  • Add the data action starter to the story.
  • Run the data action.