Aggregation with SUM is not working

Hello, I have a data source in which I have theses columns : name, month (as integer), md (float).
for a given name, and a given month, I have many entries.
I want to add another column (calculated fiels) in which I calculated the sum of {md} for a given name and field.
I used this syntax to do: sum({md},[{FULL_NAME},{monthnum}])
unfortunately, I get this error when I do so :

Function SUM should have 1 argument(s) instead of 2 argument(s).

can you help me to solde this please

1 Like

Hmmm, it’s working for me.

You sure you are doing this in the quicksight calculated field portion, and not sql?

This is mine and it works.

sum({int},[{client_id[users]},{arrival_timestamp}])

I am having the same issue and it is in the calculated field portion. As soon as I hit the Save button, the red squiggly line appears and the Save button becomes disabled. Feels like a LAC-A library or something should be imported somewhere, but I would not know where to do that.

Edited:
I was trying to add a field on the dataset level in QuickSight. LAC does not seem to work from there. When adding a calculated field by adding it from an analysis (open analysis, click the add button in the top lef corner and select ‘add calculated field’) LAC does work.

Let me clarify, I think you are trying to create a calculated filed in “DataSet” by this formula “sum({md},[{FULL_NAME},{monthnum}])” and see the error message “Function SUM should have 1 argument(s) instead of 2 argument(s)”

If you want to pre-aggregate this summation in dataset you should use sumOver, if I refer to your example, it should be sumOver(sum(md), [{FULL_NAME}, {monthnum}] )

SumOver reference: sumOver - Amazon QuickSight

1 Like