Build Data Action

Objective

After completing this lesson, you will be able to build a Data Action
  1. Select Main Menu > Data Actions.

  1. Select the Data Action tile to create a new Data Action.

  1. Enter Admin_DA_Rebates for the Name and Description.

  2. Click on the Default Model drop-down and select PnL_Admin_New (or the model you copied in the previous section - PnL_CH3 for Data Actions Module) as the default model.

  1. Click on the Save Data Action icon, then Save.

  1. The Name and Description will already be populated with what was entered in the previous steps, so you can just select the Save button to Save.

  1. Select the Add Advanced Formulas Step icon.

  1. Enter Calculate Rebates for the formula Name and Description.

  2. Under Variable select the + icon then Calculation.

  1. In the Target select All.

  1. In the Target Scope dialg box select + Add.

  1. Select Accounts.

  1. As shown in image below, drill down through the members list and select PL011 Rebates. Then select OK.

  1. Select OK again.

  1. We will now set the Source Scope. Select the + icon within Expression.

  1. Select Source Scope.

  1. In Source select All.

  1. Click +Add

  1. Click Accounts

  1. As shown in image below, drill down through the members list and select PL010 Product Sales. Then select OK.

  1. Select OK again.

  1. Select the + icon to the right of the Source then select Source Scope.

  1. In the second Source select All.

  1. Select + Add.

  1. Select Accounts.

  1. As shown in screenshot below, select KP003 Rebate %. Then select OK.

  1. Click + Add.

  1. Select Organization.

  1. Select Unassigned. Then select OK.

  1. Click OK again

  1. Click on the operator between the two Source Scopes to change it from an addition (+) operator to a multiplication (x) operator.

  1. Select the x.

  1. Your Data Action should now look like this:

  1. Select the Save icon to save your Data Action.

Optional exercise - Create an AI generated script

Another feature that is available when creating Data Actions is the Just Ask AI functionality, to automatically create your script with the click of a button.

  1. Select the Script tab.

  1. Copy and paste the following comment into the editor to highlight the fact that it is an AI generated:

AI generated script

  1. On the next line copy and paste the following comment:

calculate rebate = product sales * rebate%

  1. Then highlight the whole comment line and select the Generate Script button.

  1. Wait a moment for the AI to generate the script for you.

  1. You will see the script has been generated and you have the option to Accept or Reject what the AI has created.

Note

The AI script is the same as the script you generated from using the

  1. Select Main Menu > Data Actions.

  1. Select the Data Action tile to create a new Data Action.

  1. Enter Admin_DA_Rebates for the Name and Description.

  2. Click on the Default Model drop-down and select PnL_Admin_New (or the model you copied in the previous section - PnL_CH3 for Data Actions Module) as the default model.

  1. Click on the Save Data Action icon, then Save.

  1. The Name and Description will already be populated with what was entered in the previous steps, so you can just select the Save button to Save.

  1. Select the Add Advanced Formulas Step icon.

  1. Enter Calculate Rebates for the formula Name and Description.

  2. Under Variable select the + icon then Calculation.

  1. In the Target select All.

  1. In the Target Scope dialg box select + Add.

  1. Select Accounts.

  1. As shown in image below, drill down through the members list and select PL011 Rebates. Then select OK.

  1. Select OK again.

  1. We will now set the Source Scope. Select the + icon within Expression.

  1. Select Source Scope.

  1. In Source select All.

  1. Click +Add

  1. Click Accounts

  1. As shown in image below, drill down through the members list and select PL010 Product Sales. Then select OK.

  1. Select OK again.

  1. Select the + icon to the right of the Source then select Source Scope.

  1. In the second Source select All.

  1. Select + Add.

  1. Select Accounts.

  1. As shown in screenshot below, select KP003 Rebate %. Then select OK.

  1. Click + Add.

  1. Select Organization.

  1. Select Unassigned. Then select OK.

  1. Click OK again

  1. Click on the operator between the two Source Scopes to change it from an addition (+) operator to a multiplication (x) operator.

  1. Select the x.

  1. Your Data Action should now look like this:

  1. Select the Save icon to save your Data Action.

Optional exercise - Create an AI generated script

Another feature that is available when creating Data Actions is the Just Ask AI functionality, to automatically create your script with the click of a button.

  1. Select the Script tab.

  1. Copy and paste the following comment into the editor to highlight the fact that it is an AI generated:

AI generated script

  1. On the next line copy and paste the following comment:

calculate rebate = product sales * rebate%

  1. Then highlight the whole comment line and select the Generate Script button.

  1. Wait a moment for the AI to generate the script for you.

  1. You will see the script has been generated and you have the option to Accept or Reject what the AI has created.

Note

The AI script is the same as the script you generated from using the