KNOWLEDGE BASE

Different Values for LOD Calculation When Data is Refreshed


Published: 10 Jan 2020
Last Modified Date: 30 Jan 2020

Issue

When the data for a view is refreshed, for example by right-clicking the data source in the data pane and selecting 'Refresh', or by closing and re-opening the workbook, the values displayed for LOD calculations may be different.

Environment

  • Tableau Desktop
  • FIXED LOD expression that references 4 dimensions
  • Boolean expression that compares a field against zero (0)

Resolution

Option 1

Use a calculation that preserves the precision of the field being compared against zero, but avoids comparing a decimal number against the integer zero, e.g.:
(INT (1000000* SUM([decimal number field])) = 0 

Option 2

Change the data type of the numerical field being compared in the Boolean expression to Number (whole).

Cause

The LOD expression references a Boolean field which compares a field with decimal number type against the integer zero. Comparing floating-point numbers can cause issues in equality tests. For more information, see this article about how comparing floating-point numbers can cause unexpected results.
Did this article resolve the issue?