# Calculating the difference between two columns that are themselves a custom expression

Hi,

I have a sales table I'm using to calculate Sales uplift from a Campaign. See the cross table below which has sales information by item, and then sales totalled under base and campaign

The sales under base and Campaign are calculated as 7 * Sum([Sales]) / UniqueCount([Date]) to get an average sales per week.

I want the 3rd column to be the percentage difference between these two columns:

How would i express this as a customer expression. I assume i would have to do something like this:

7 * Sum([Sales]) / UniqueCount([Date]) as [Sales per Week], -1+(7 * Sum([Sales]) / UniqueCount([Date]))/(7 * Sum([Sales]) / UniqueCount([Date])) OVER (Previous([Axis.Columns])) as [Uplift]

But this doesn't work. Any help would be greaty appreciated!

Thanks!

Linda