KNOWLEDGE BASE

Unexpected Results for Running Total When Using Continuous Number-Based Dimension on Reversed Axis


Published: 02 Mar 2017
Last Modified Date: 08 May 2017

Issue

When calculating a running total for a continuous number-based dimension on a reversed axis, results appear incorrect. 

Environment

Tableau Desktop 

Resolution

Option 1: Make the dimension negative. 

  1. Create a calculated field defined as -[dimension], where [dimension] is the original continuous descending dimension in the view
  2. Remove the original dimension from the view and replace it with the calculated field
  3. Implement the RUNNING_SUM() table calculation

Option 2: Make the dimension discrete. 

  1. Right-click the dimension and select Convert to Discrete. 
  2. Right-click the dimension on the view and select Sort. 
  3. Choose Descending to mimic the look of the reversed axis. 

Cause

Reversing an axis will not change the direction of a table calculation in relation to the data.
RUNNING_SUM() is calculated along the default direction of a domain. A RUNNING_SUM() along a continuous dimension will occur from smallest value to largest value.
Did this article resolve the issue?