Hi marijn.bax,

You are using a Cross Table? Is your original data something this:

CATEGORY |
PROFIT_CTR |
AMOUNT |

Actual |
R39 |
26,232 |

FX_DIFF |
R39 |
0 |

RFF 2019.07 |
R39 |
5 |

Actual |
R56 |
22,122 |

FX_DIFF |
R56 |
0 |

RFF 2019.07 |
R56 |
1,205 |

I think what you actually want to do is first use a "Pivot" Transformation then an OVER function...

Pivot Transformation - Looks like you are using Spotfire 7.x... from menu go to "Insert > Transformations"

Now your data table will look like the format you have in your cross table. Note I used an "avg" aggregation for "Amount". Since I only expect there to be one "Amount" per "Category" and "PROFIT_CTR", the Avg aggregation will be fine here.

Next, with a Calculated Column create this OVER function and name the new column "Difference":

`Avg([Actual] - [FX_DIFF] - [RFF 2019.07]) OVER [PROFIT_CTR]`

And you should be done!

CAVEAT:

If you have other charts and analysis built on your original data table format, this Pivot Transformation will break all of them.

So if that's the case, you could instead add this data table to your dxp twice. The most efficient way to do this is Add it once, then go to "Add Data Table" again but this time choose "From Current Analysis". Then with this new data table, Add the Pivot Transformation and OVER function as described above.

Okay, so now you have two separate data tables... how do you get them to interact together? Go to "Data Table Properties" and "Relations" and relate your two tables by a common column, such as PROFIT_CTR.

**Note this process is all easier in Spotfire 10.x, but looks like you were using Spotfire 7.x