Sum of currency column giving argument error

I have a database with a currency Amount column I’m trying to sum up. When I do sum(DB.Amount), the correct sum is output, but the formula builder throws an error:

Sum expects parameter value to be a number, a list of numbers, a formatted number, a list of formatted numbers, a percentage, a list of percentages, a currency amount, a list of currency amounts, a time duration, or a list of time durations, but found [DB].Amount, which can match a column, or a list of text values

I’ve checked manually and all items in the column are either numeric or blank. Also, when I enter just DB.Amount into the formula builder, the UI tells me that it’s a “list of currency values”, though the chip for Amount has a “T” text icon next to it for some reason.

Why is this?

1 Like

G’day @Rohan_Selva-Radov ,

would it be possible for you to post a copy of doc (with data manipulated)?
something like this is granular and specific and easier to troubleshoot/see all columns in context.

alternatively, a formula like .ToNumber(), may or may not help in your scenario.

Cheers!
Mel

1 Like

Thanks! I tried to replicate the doc and redact the data, but wasn’t able to replicate the behaviour. Here’s a screenshot illustrating the problem more clearly - perhaps it helps:

Hovering over the [$] icon, it says that this outputs a list of currency amounts - but that’s not what the icon on the green chip says, and when I try to do the following formula I get the error described above.

sum(
  thisRow.Opportunities
  .filter(
      Status.In(Funded, Committed, [Ongoing commitment]))
  .filter(
    or(
      sequence(
        [Spending tracker start date], [Spending tracker end date]
      ).contains([Date closed/closing]),
      IsBlank([Date closed/closing])
    ))
  .Amount
)
1 Like

Hi @Rohan_Selva-Radov

Please check if any row contains text instead of a number in this currency column.

If any row has text, the Sum() formula won’t work. If you see a small red flag in the column, that’s likely the issue.

Best regards,
Arnhold

1 Like

I’ve checked (formulaically) and there are no text entries in the column – every row is either a number or blank.

What is strange is that the Sum() formula leads to an output which seems like the correct number, but there is still that error in the formula editor interface.

1 Like

I was able to resolve this by selecting the whole Amount column, and copying the values into a fresh currency column I created. Not sure what was behind this bug, though. Thanks for the suggestions!

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.