This commit is contained in:
Gowtham M 2025-02-20 14:42:55 +05:30
parent 932ff77bd1
commit 7ca84f775d
2 changed files with 9 additions and 1 deletions

Binary file not shown.

View File

@ -284,7 +284,15 @@ func extractRecordKeyValue(data []Observation, key string, additionalkey string,
case "total", "average", "different":
if val1, exists1 := data[0].ObsKey[key]; exists1 {
if val2, exists2 := data[len(data)-1].ObsKey[key]; exists2 {
return val1 + " - " + val2
if val1 == val2 {
return val1
} else {
if val1 > val2 {
return val2 + " - " + val1
} else {
return val1 + " - " + val2
}
}
}
return val1
}