🐛 Fix database rollup calc https://ld246.com/article/1713803461956
This commit is contained in:
parent
da5856da9d
commit
1f1388c1eb
1 changed files with 2 additions and 2 deletions
|
@ -718,7 +718,7 @@ func (r *ValueRollup) RenderContents(calc *RollupCalc, destKey *Key) {
|
|||
}
|
||||
}
|
||||
if 0 < len(r.Contents) {
|
||||
r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(float64(countEmpty/len(r.Contents)), NumberFormatPercent)}}
|
||||
r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(float64(countEmpty)/float64(len(r.Contents)), NumberFormatPercent)}}
|
||||
}
|
||||
case CalcOperatorPercentNotEmpty:
|
||||
countNonEmpty := 0
|
||||
|
@ -728,7 +728,7 @@ func (r *ValueRollup) RenderContents(calc *RollupCalc, destKey *Key) {
|
|||
}
|
||||
}
|
||||
if 0 < len(r.Contents) {
|
||||
r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(float64(countNonEmpty/len(r.Contents)), NumberFormatPercent)}}
|
||||
r.Contents = []*Value{{Type: KeyTypeNumber, Number: NewFormattedValueNumber(float64(countNonEmpty)/float64(len(r.Contents)), NumberFormatPercent)}}
|
||||
}
|
||||
case CalcOperatorSum:
|
||||
sum := 0.0
|
||||
|
|
Loading…
Add table
Reference in a new issue