2 of 2 people found this helpful
This is a known issue in Tableau Prep per this KB article: Unable to Replace Edit or Group Values Containing "&" (ampersand) in Tableau Prep | Tableau Software
Published: 01 Aug 2018
Last Modified Date:
03 Aug 2018
When using values containing the ampersand character "&", the value cannot be renamed or edited.
Additionally, when using the 'Edit Value' option, the command is recorded as successfully completing in the Changes
pane, however the value remains unchanged, and the renamed value not containing the ampersand is shown to be "not present in the data set".
Tableau Prep 2018.2.1
Try one of the following workarounds:
- Use aliases or replace calculated field in Tableau Desktop.
- Use Tableau Prep 2018.1.2.
This behavior (ID: 807311) is currently under investigation.
If this answers your question, please mark this response as correct so that others may find it useful in the future. Thx, Don
1 of 1 people found this helpful
One other workaround not mentioned in the KB article is to replace the character with something else unused that doesn't have problems using a calculation.
REPLACE([Field], "&", "|") does NOT seem to work.
However, you can replace the character using the CHAR() function, like this:
REPLACE([Field], CHAR(38), "|")
Field values would change from:
AT&T to AT|T
Fox & Hound to Fox | Hound
I would do this very early in the flow (maybe even insert a step right after the Input). Once the rest of the flow is done (pivots, grouping, etc...) then, at the end of the flow, reverse it to restore the ampersand:
REPLACE([Modified Field], "|", CHAR(38))
Also problematic are ">" and "<". They can be addressed in the same way. Hopefully this is fixed in the next release.
Hope this helps,