Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have one MinTemperature field and MaxTemperature Field. and one Current Temperature field..
I want to Calculate the Delta for this. e.g. Let Say Delta will be calculative on the basis of nearest Min or MaxTemp. in Below first case MinTemp is 1 and max is 5, but Current temp is 0.5 which is nearer to MinTemp so Delta is CurrentTemp - MinTemp.
MinTemp&''&MaxTemp | CurrentTemp | Delta |
---|---|---|
1 to 5 | 0.5 | 0.5 |
2 to 5 | 6 | 1 |
-1 to 5 | -1.2 | 0.2 |
Please suggest.
Thanks
Abhay
Hi abhay, my first expression returns those values:
If(fabs(CurrentTemp-MinTemp)<fabs(CurrentTemp-MaxTemp), CurrentTemp-MinTemp, CurrentTemp-MaxTemp)
Yes, I agree.
hmm, but what would be the final expression? pls suggest
If(fabs(CurrentTemp-MinTemp)<fabs(CurrentTemp-MaxTemp), CurrentTemp-MinTemp, CurrentTemp-MaxTemp)
As suggested by RubenMarin