Tableau error Function arguments

The calculation contains errors

An average is being called with (Float, float, float), did you mean (float)?

AVG averages one field down the rows. It does not average several columns across a row, so AVG([Jan], [Feb], [Mar]) has too many arguments.

Updated · Checked on the xmetric engine

Which formula raises it, and what fixes it?

Raises the error
AVG([Jan], [Feb], [Mar])
Tableau: An average is being called with (Float, float, float), did you mean (float)?

The xmetric engine rejects it too.

Fixed
([Jan] + [Feb] + [Mar]) / 3

On each of the 3 example rows it returns:

RegionJanFebMarResult
East10141212
West1291512
West4655

Why it works. Adding the three columns and dividing by 3 gives the average for each row. If a month can be empty, wrap each one in ZN() and divide by the count of non-empty months instead, or a single null makes the whole row null.

The 3 example rows
RegionJanFebMar
East101412
West12915
West465

What else raises this message?

  1. Raises it

    MAX([Jan], [Feb], [Mar])

    Fixed

    MAX(MAX([Jan], [Feb]), [Mar])

    Row-level MAX takes exactly two values; nest it for three or more.

    Checked on the xmetric engine: the first fails, the fix runs.

  2. Raises it

    SUM([Jan], [Feb])

    Fixed

    [Jan] + [Feb]

    SUM aggregates one field across rows. To add fields in the same row, use +.

    Checked on the xmetric engine: the first fails, the fix runs.

Does my formula have this problem?

Paste your formula and run it on the example rows. It uses the fields [Region], [Jan], [Feb], [Mar]; rename yours to match.

Runs in your browser on the xmetric engine. Nothing is uploaded.

Which functions does this involve?

What do people ask about this error?

How do I average across columns when some are NULL?

Count the non-null ones: (ZN([Jan]) + ZN([Feb]) + ZN([Mar])) / (IIF(ISNULL([Jan]),0,1) + IIF(ISNULL([Feb]),0,1) + IIF(ISNULL([Mar]),0,1)).

Is there a better shape for monthly columns?

Yes: pivot them into two columns, month and value. Then AVG([Value]) works, and charts by month come for free.

Where is this message documented?