diff --git a/packages/server/src/api/controllers/view/viewBuilder.js b/packages/server/src/api/controllers/view/viewBuilder.js index b0f39b2f1f..6e2e5c8527 100644 --- a/packages/server/src/api/controllers/view/viewBuilder.js +++ b/packages/server/src/api/controllers/view/viewBuilder.js @@ -126,7 +126,7 @@ function viewTemplate({ field, tableId, groupBy, filters = [], calculation }) { delete filters[0].conjunction } const parsedFilters = parseFilterExpression(filters) - const filterExpression = parsedFilters ? `&& ${parsedFilters}` : "" + const filterExpression = parsedFilters ? `&& (${parsedFilters})` : "" const emitExpression = parseEmitExpression(field, groupBy)