From 97d0e36d0347125649eadf0e7f63c35c387126e6 Mon Sep 17 00:00:00 2001 From: Josema Camacho Date: Mon, 6 Jul 2020 10:33:36 +0200 Subject: [PATCH] Fix formula count --- cartoframes/viz/widgets/formula_widget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cartoframes/viz/widgets/formula_widget.py b/cartoframes/viz/widgets/formula_widget.py index b43f327f5..13eec4372 100644 --- a/cartoframes/viz/widgets/formula_widget.py +++ b/cartoframes/viz/widgets/formula_widget.py @@ -50,8 +50,8 @@ def formula_widget(value, operation=None, title=None, description=None, footer=N def _get_value_expression(operation, value, is_global): - if value == 'count': - formula_operation = _get_formula_operation(value, is_global) + if value == 'count' or operation == 'count': + formula_operation = _get_formula_operation('count', is_global) return formula_operation + '()' elif operation in ['avg', 'max', 'min', 'sum']: formula_operation = _get_formula_operation(operation, is_global)