1 Reply Latest reply on May 23, 2018 9:49 AM by Amber Loranger

    FYI: Inadvertent Duplicate Fieldname (An unexpected error occurred...)

    Daniel Stanish

      Good day all! Thought I'd share something I just came across that had me scratching my head. I was putting together a data source in Tableau Desktop 2018.1 and was attempting to add a "Create Join Calculation..." to an existing join, and received the following:



      Thought that was odd, since I connect to this database regularly for numerous workbooks. For this workbook, I tried various things such as recreating the datasource in an brand new workbook. searching for information on the error on the internet, etc. I thought some of the generated names were getting too long so went through and shortened everything but nothing resolved the issue.


      On accident, I was searching for key fields to make joins on and saw there were two with the exact same name. Turns out, I'd put a small custom query in the hierarchy, and it had a number of fields named identically to other fields in the hierarchy. I'm so used to Tableau automatically renaming table columns with identical names it didn't even occur to me that I'd have to name the output fields more carefully in a custom query when it is to be joined to other tables. Renamed the output columns of the small custom query and the issue resolved!


      TL;DR: Custom SQL nodes in the datasource tree need to output unique column/field-names.