diff --git a/packages/builder/src/components/backend/DataTable/buttons/grid/GridViewCalculationButton.svelte b/packages/builder/src/components/backend/DataTable/buttons/grid/GridViewCalculationButton.svelte
index f6ef6e6099..7b279d3948 100644
--- a/packages/builder/src/components/backend/DataTable/buttons/grid/GridViewCalculationButton.svelte
+++ b/packages/builder/src/components/backend/DataTable/buttons/grid/GridViewCalculationButton.svelte
@@ -90,8 +90,15 @@
const getFieldOptions = (self, calculations, schema) => {
return Object.entries(schema)
.filter(([field, fieldSchema]) => {
- // Only allow numeric fields that are not calculations themselves
- if (fieldSchema.calculationType || !isNumeric(fieldSchema.type)) {
+ // Don't allow other calculation columns
+ if (fieldSchema.calculationType) {
+ return false
+ }
+ // Only allow numeric columns for most calculation types
+ if (
+ self.type !== CalculationType.COUNT &&
+ !isNumeric(fieldSchema.type)
+ ) {
return false
}
// Don't allow duplicates
@@ -234,7 +241,7 @@