Skip to main content

When I create a relationship or join between two tables, the fields that populate under the 'select field' drop down are not correct.

 

The wrong fields are being displayed under the 'select fields' dropdown during relationships and joins 

The 'District1' option you can see in this screenshot does not exist in either of the tables. If I select either of the tables on their own, the fields I can see are correct and there is no 'District1' field. But when I try to create a relationship or join, that field appears. It also takes the place of the field I actually want to use, so creating the relationship or join is impossible. A couple of things I've noticed:

 

  • The incorrect District1 field always appears in the dropdown box beneath whichever table is on the right. In the screenshot above the District1 field is taking the place of another field in the 'candidates' table. But if I switch the order so that the candidates table is first and the 'Export_Output2' table is on the right, the District1 field will take the place of the field I need to use in the Export_output2 table.
  • This error only happens when both of these specific tables are used. I can create a join using either of these tables with other tables

 

The District1 field came from a previous table I was working with. I deleted that table because it didn't have all the info I needed. Specifically, the District1 field only contained half of the data I needed. When I create a join with these tables and select the District1 field just to see what happens, I find I can create a viz, but the data in the viz shows the incomplete data that originally existed in the old table that contained the District1 column. It's like tableau remembers the District1 field from the old table, and remembers all the data that field contained, and now it thinks that field exists in the candidates or export_output2 table (whichever is on the right). I'm so confused.

 

I've tried refreshing connections, changing the names of the tables, I even created the export_output2 table all over again from scratch. I've deleted and reinstalled tableau, still nothing. Any help would be appreciated!

3 answers
  1. Aug 14, 2022, 2:57 AM

    Hi @Jon Biggerstaff​ ;

    I've got a handful of guesses, but keep an eye out for more experienced users.😁

    • Confirm that there are no hidden fields. If you hid fields in a data set, they will not be visible. You may need to go to a workbook using the data source and unhide them.
    • Confirm the missing fields aren't coded as measures. Some fields-- such as [zip code]-- might not be recognized as a dimension to join upon until they are converted to a dimension.
    • Confirm fields have the same data type. It's possible this is relational in nature, so when you pick an integer field in one, only integer fields appear in the other (this is postulation on my part). Make sure the data types match before you try a join.
    • Check the data pane. Before worrying about a join, click on Export_Output and review its fields in the data pane; do the same with candidates to confirm the fields are present. Per above-- take note of their data types, too. Indeed, it may actually be faster to check each file independently with no other ones in the data pane. You can even jump to a worksheet to see how Tableau is populating the fields.
    • Verify your database. It looks like candidates originates from the Colorado Project database. Double-check you got the right one.
    • Rather than a relationship, try a regular join. Open your Export_Output file in the Data Source pane, then see if you can construct a physical join with candidates. See if the correct values appear.
    • Sneak-QL. If you're using a custom SQL code, make sure it's not renaming your fields.
    • Reference with a custom calc. This is a little bizarre, but see if you can create a join by referencing the "missing" field.

     

    Again-- keep your eyes & ears open for those with more experience: these are just the steps I'd take to narrow down the issue. 😉

     

    You may also find help here:

    https://community.tableau.com/s/question/0D54T00000C5rz3SAB/edit-relationship-does-not-show-all-fields

0/9000