# Custom Comparison Formula and Percent of Previous Value In a Single Value Viz

Sigma Out of The Box shows Current Growth (increase) from the comparison value, while the ask is to show Current Value in relation to the previous value.
So, if Current = 6 and Previous = 10, Sigma shows (10-6)/10 = -40% (i.e. our value of 10 went down by 40%). The ask is to instead show -6/10= -60% (i.e. 10 now became 6, 60% of the original value)

Currently, we have no control over the Comparison formula, but we can modify the formula for the comparison value:

If A represents Current Value and B represents previous value (used for comparison), then Sigma uses (B - A) / B, but we want it to instead use A / B

So, instead of B, we need some unknown B_new, such as :(B - A) / B = A / B_new .

What would the value of that B_new be:

(B-A)/B = A/ B_new

Now need to calculate this unknown B_new, based on the knowns A and B:

B/(B-A) = B_new / A , therefore → B_new = AB / (B-A)

Let’s validate thi by spot-checking.

When A= 6 and B = 10. B_new = (6* 10) / (10-6) = 60/4 = 1515 down to 6 will show as a -60%, which is what we wanted.

So, the final formula is:

Use a new calculated field [Previous Value Adjusted], using the formula:
[CurrentValue] * [PreviousValue] / (PreviousValue - CurrentValue)

Use this new [Previous Value Adjusted] as the comparison.