cancel
Showing results for
Did you mean:

Calculate difference between values from three columns

Cosmonaut

Hi,

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

It needs to look something like this:

 A B C Difference 10 10 10 0 10 10 9 1 10 0 0 10 10 9 10 1

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

7 REPLIES 7
Ranger

what are the conditions of "differences" ?  eg 10 = 10 = 10  is 0 , but why in row 3 when you got 10 0 0 the difference is 10 instead of 20 ? maybe You can provide more examples.

Cosmonaut

the calculation goes like this:

row 1 :  10 - 10 - 10 (all the three are same) = 0

row 3 : 10 - 0 - 0 (10 is the remaining value) =  10

row 4: 10 - 9 (since two values are same i.e 10, it needs to take the difference from the value that is different)

Captain

You want to subtract distinct values where the distinct values are ordered desc   ?

Offhand I'm thinking "Incorta over Incorta" ( i.e. use a result set as your insight data source ) where you get your three values and order them accordingly.

-- IncortaOne@PMsquare.com --
Cosmonaut