---
title: "Convert cumulative values to daily deltas with the Diff action"
description: "When you have tables which contain dated attributes describing total values (total daily orders, total monthly revenue, etc.) at a given time"
url: https://docs.ovhcloud.com/de/guides/public-cloud/data-platform/dpe-actions-diff
lang: de
lastUpdated: 2026-09-14
---
> For AI agents: the complete documentation index is available at https://docs.ovhcloud.com/de/llms.txt, the full documentation bundle is available at https://docs.ovhcloud.com/de/llms-full.txt.

# Convert cumulative values to daily deltas with the Diff action

## Objective

When you have tables which contain dated attributes describing total values (total daily orders, total monthly revenue, etc.) at a given time, the diff action lets you compute the difference of these values between consecutive time increments.

For example, let's consider the _total\_fans_ attribute in the table below calculated each day for a certain social media profile page. Assuming the _total\_fans_ describes the total number of fans since the creation of this profile, the **diff** action will let you compute the number of new fans acquired or lost between each day.

![diff](/images/public-cloud/data-platform/product/dpe/actions/diff/picts/diff_explain.png)
Please note that first dates of each ids won't have their first incremental value computed, as the previous date is not known.
There is an optional advanced parameter if you have the date of creation so that the first incremental date will be computed as equal to the total attribute.

## Action Configuration

### Action's configuration interface

When configuring the **diff** action from the interface, you will be asked to specify:

- the **table name** which contains the total value
- the **timeline attribute** which will be used to get the time increments between 2 total values
- the **measure** to compute, there can be several of them for a given table, for each specify the **cummulative value attribute** and the **incremental value attribute**

The primary keys of the table are automatically assigned.

![diff](/images/public-cloud/data-platform/product/dpe/actions/diff/picts/diff.png)
### Action's example JSON configuration

Like any other DPE actions, you can also configure the action in "Advanced Mode" by editing its JSON configuration, a snippet of which is shown below.

```json
{
    "table": "dwh/default_dataset/posts",
    "attribute_timeline": "date",
    "attribute_total": ["total_impressions"],
    "attribute_diff": ["incr_impressions"],
    
    "table_attribute_created_at": "ref_posts",
    "attribute_created_at": "post_createdat",
}
```

### Action's Parameters

Below is a short description of all available attributes in the JSON configuration.

|             Parameter             | Description                                           | Example                 | Required |
| :-------------------------------: | ----------------------------------------------------- | ----------------------- | -------- |
|             **table**             | Name of the table on which to run the diff action     | Dwh/agr\_site\_date     | Yes      |
|      **attribute\_timeline**      | Name of the attribute of timeline                     | date                    | Yes      |
|        **attribute\_total**       | List of attribute names with totals.                  | \["total\_impressions"] | Yes      |
|        **attribute\_diff**        | List of attribute names with incremental values.      | \["incr\_impressions"]  | Yes      |
| **table\_attribute\_created\_at** | Optional table containing date of creation of ids     | ref\_posts              | No       |
|     **attribute\_created\_at**    | Optional attribute containing date of creation of ids | post\_createdat         | No       |

## Go further

If you need training or technical assistance to implement our solutions, contact your sales representative or click on [this link](https://www.ovhcloud.com/de/professional-services/) to get a quote and ask our Professional Services experts for a custom analysis of your project.

Ask questions, give your feedback and interact directly with the team building the Data Platform on the dedicated [Discord channel](https://discord.gg/ovhcloud).

If you need support with your OVHcloud services, create a request in our [Help Centre](https://help.ovhcloud.com/csm?id=csm_get_help).

Join our [community of users](https://community.ovhcloud.com/).
