KNOWLEDGE BASE

Calculated Field Returning Incorrect Results


Published: 28 Mar 2013
Last Modified Date: 03 Nov 2017

Issue

A calculated field is returning incorrect results. For example, a field with the formula:

[Profit]/[Sales]

is not returning the expected ratio.

Environment

Tableau Desktop

Resolution

  1. Aggregate the measures within the calculated field. For example, change the calculated field's formula:
    [Profit]/[Sales] to  SUM[Profit]/SUM[Sales]
  2. Remove the calculated field from the view and then re-add it to the view.

Cause

The calculation used the disaggregated (row) values instead of the aggregated (summed) values of the fields.
Did this article resolve the issue?