cancel
Showing results for 
Search instead for 
Did you mean: 

Calculate difference between values from three columns

Ruchita
Cosmonaut

Hi,

I need to calculate the difference amongst values present in three columns.

It needs to look something like this:

ABCDifference
1010100
101091
100010
109101

Can someone guide me to formula or function that can help me acheive this result ?

7 REPLIES 7

Values 1, 9, 8   What result do you expect?   

You've mentioned that ties are ignored, but what exactly is the algorithm you are trying to employ?   

-- IncortaOne@PMsquare.com --

Prince
Employee
Employee

If I understood the case correctly, you need the following:

max(abs(A-B), abs(B-C), abs(A-C))

the maximum of the absolute difference between any 2 columns, right?

Hi Prince,

Thank you for your understanding of the case aptly. 

I used a nested max() because individual max() gives an error that it accepts only 2 parameters, something like this:

max( abs(A-B),

            max(

                        abs(B-C), abs(A-C)

                 )

)

Appreciate your prompt response and support !