05-30-2023 09:59 PM
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 ?
Solved! Go to Solution.
06-01-2023 06:58 AM
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?
05-31-2023 11:22 PM
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?
06-01-2023 10:12 PM
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 !