Error in the group by count function

I’m trying to use the count function and group by another field, but i’m keep getting an error. what am I missing?

I’m adding the function’s explanation from the guide:

thank you!

Hi @shirakoresh

Could you please check if the field types (dimension or measure) for alert_number and month are as per the documentation:

count(dimension or measure, [group-by level])


dimension or measure

The argument must be a measure or a dimension. Null values are omitted from the results. Literal values don’t work. The argument must be a field.

group-by level

(Optional) Specifies the level to group the aggregation by. The level added can be any dimension or dimensions independent of the dimensions added to the visual.

The argument must be a dimension field. The group-by level must be enclosed in square brackets [ ]. For more information, see LAC-A functions.

1 Like

Hi @shirakoresh - Is it possible to share sample data? Also check the group by level is a dimension field.

Regards - Sanjeeb

1 Like

Hi! yes, the ‘month’ field is a dimension and the ‘alert number’ field isn’t literal…

Hi! Unfortunately I cant share the data :frowning: the group by field (‘month’) is a dimension field

Hi @shirakoresh - No problem. In that case, can you please raise a ticket to AWS Customer support team so that they can analyze the issue and guide you the solution. To raise a ticket, please follow the link - Creating support cases and case management - AWS Support

Regards - Sanjeeb


thank you! will do :grinning: :grinning:

@shirakoresh - Did you check if the ‘month’ field is designated as Dimension in QuickSight? If the ‘month’ field contains numeric values, sometimes QuickSight automatically assign it as Measure due to its numeric metadata. However you can use the “Convert to Dimension” feature to ensure that it is designated as Dimension in QuickSight, which is a pre-requisite for that LAC function to work like the way you are looking for. Hope this helps!


Did my suggestion help you in resolving your query? If yes, would request you to mark the post as “Solution”. This will help the community to find guidance and answers to similar question. Thank you!

1 Like

Yes, this is a dimension in Quicksight as well