diff --git a/superset/connectors/sqla/models.py b/superset/connectors/sqla/models.py index 02b85c2c0163e..c3d440a624f64 100644 --- a/superset/connectors/sqla/models.py +++ b/superset/connectors/sqla/models.py @@ -1094,7 +1094,7 @@ def get_sqla_query( # pylint: disable=too-many-arguments,too-many-locals,too-ma # if groupby field/expr equals granularity field/expr if selected == granularity: sqla_col = columns_by_name[selected] - outer = table_col.get_timestamp_expression( + outer = sqla_col.get_timestamp_expression( time_grain=time_grain, label=selected, template_processor=template_processor,