Trailing Spaces on a Category Leads to Unexpected Behavior When Creating Group

Published: 02 Mar 2018
Last Modified Date: 05 Mar 2018


Leading or trailing spaces in data source values causes issue with grouping.


  • Tableau Desktop 10.5.1
  • Exasol
  • Oracle


  1. Create a calculated field of the original dimension such as: TRIM([Dimension]).
  2. Next, create the desired group from the trimmed version.
  3. If the spaces are meant to differentiate the categories, it may be better to use a character other than space, tab, new line, or carriage return.


When a Group is created in Tableau, the result set has had all spaces TRIM()ed. This means that 'Category' and 'Category    ' are both part of the 'Category' group.

However, the database still knows that there's a difference, so the 'Category    ' records will be in the separate 'Other' group rather than being in 'Category' like one might expect.
Did this article resolve the issue?