Tableau Server Invalid field formula due to limitations in the data source

//

Have you received the Tableau error message “Invalid field formula due to limitations in the data source”?

I have had this error when publishing a Tableau workbook to the Tableau server.

The workbook worked perfectly while in Tableau Desktop but failed on publishing to the Tableau server.

It turns out this is due to Tableau Server referencing hidden and unused fields.

For some reason, the server can’t find this field(s).

Perhaps the field isn’t published as it’s hidden and that causes the problem but that’s pure speculation on my part.

How to fix the Tableau error “Invalid field formula due to limitations in the data source”

We know the cause of the error. But the important piece is how to fix it.

In a previous post about unhiding sheets in Tableau I talk about editing the XML behind the Tableau visualisation.

To fix the “Invalid field formula due to limitations in the data source error” we need to access the XML.

In the XML we need to find the hidden fields and delete them.

Edit the XML to fix the “Invalid field formula due to limitations in the data source” error

I strongly recommend taking a copy of the workbook, just in case something goes wrong while altering the XML.

Open the workbook using a text editor, such as Notepad, and searching for the name of the hidden field(s) – assuming you know what the names are.

If not, search for “hidden=’true'”. This should reveal all of the hidden fields.

Next remove all of the XML referring to that field.

I’ve only done this once – and Tableau does evolve over time so this may change in future – but it was very simple.

Delete the following XML code, with the hidden field name being ‘PreviousItemDuration (group)’:

<column aggregation=’Sum’ caption=’PreviousItemDuration (group) old’ datatype=’integer’ hidden=’true’ name='[PreviousItemDuration (group)]’ role=’dimension’ type=’ordinal’>
<aliases>
<alias key=’-12′ value=’12 Month’ />
<alias key=’-6′ value=’6 Month’ />
<alias key=’18’ value=’18 Month+’ />
</aliases>
</column>

Once you’ve removed all of the hidden fields, save the file in the text editor and re-open in Tableau.

If the XML is correctly removed, the problem should be solved and you should be able to publish the workbook to the Tableau server.

Leave a Comment