Skip to content

Commit

Permalink
reset average value to 0.0 if all values in serie are absent
Browse files Browse the repository at this point in the history
  • Loading branch information
spacefreak86 committed Nov 30, 2024
1 parent 22bbd2c commit 51fab5f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/expr/helper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,8 @@ func SummarizeValues(f string, values []float64, absent []bool) (float64, bool,
}
if total > 0 {
rv /= float64(total)
} else {
rv = 0.0
}
case "max":
rv = math.Inf(-1)
Expand Down

0 comments on commit 51fab5f

Please sign in to comment.