Open fnkear opened 6 months ago
Hi @fnkear ,
Thank you for reporting the issue and suggesting a fix. I have isolated it to a '@progress/kendo-data-query' bug in this example - https://stackblitz.com/edit/react-6oe2cf-eewany?file=app%2Fmain.jsx and will suggest the fix to our responsible dev team for research.
If you have any other questions, you could also submit a ticket in our support system.
Greetings, Plamen
Hi @zdravkov ! Yes, your reproduction is much cleaner 👍 Thank you a lot!
I'm submitting a...
Current behavior
null
or other non-numeric value in the last row, result ofaverage
aggregate will benull
null
or other non-numeric value in rows between numeric values, result ofaverage
aggregate will be incorrect numberExpected behavior
The best would be if
average
ignores non-numeric values in presence of numeric (and it can use last non-numeric if there were no numeric values at all)Minimal reproduction of the problem with instructions
The sandbox ( forked from https://www.telerik.com/kendo-react-ui/components/grid/grouping/grouping/ )
https://stackblitz.com/edit/react-6oe2cf?file=app%2Fmain.jsx https://react-6oe2cf.stackblitz.io
Please check Average Unit Price for "Beverages" and "Condiments"
What is the motivation or use case for changing the behavior?
Sometimes data has items "with value" and "without value" mixed; but it still makes sense to calculate Average for items having value :)
Environment
Browser:
System:
Suggested solution
the piece of code which I would suggest for "Average" aggregate: