A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
OK, I stand corrected, your source data is already in good format. And the "Summary" you displayed is exactly a PivotTable in Excel.
.
If you add a new fruit, in a pivottable it will appear.
.
.
Click on the "Y" in the slicer will exactly reproduce your example
PS: here is link to my example file https://1drv.ms/x/s!AlV7uGd6SkRXgR4GgdVb5RyRCiSb