Few years back when I just started working on Tableau, I had a requirement of showing a detailed report(tabular view) in Tableau, which was having overall 17 columns.
But in Tableau up-to 6 columns it works fine, but as soon as we add 7th column, it starts concatenating columns from the first. And when you take off the 7th column it works fine.
Was this a bug or by design?
But how to achieve this?
Below are some steps:
- Go to ‘Analysis’ on the top menu bar, go to ‘table layout’ and then ‘advanced’, a table options menu will appear.
- Here you will see a ‘Maximum level of column labels’, by default this is set to 6 (and you can only set a maximum of 16. In order to make this value visible in the xml we need to change it from the default value, I will set it to 16.
But what if my # of columns will be more than 16, there’s a trick to increase that as well.
- Save your file as a .twb file. If you have already saved your file as a .twbx you can right-click on the icon and choose ‘unpackage’. This will create a .twb file and a folder with all the excel files/extracts/images/etc that were part of the packaged workbook.
- Open the .twb file in a text editor, in my example I will use notepad
- Find the line of xml that defines the maximum level of rows (which actually relates to column headers), it looks something like…<format attr=’row-levels’ value=’16’ />
- Amend the placeholder value we gave by amending the maximum number of column levels value, in my case 16, with the number of columns you want in your table, I’m going to put 17.
- Save the file.
- Open the tableau workbook and build out your 17 column (or however many you wish) table.
Note:- If you go back into Analysis->Table Layout->Advanced it will still say the last numbers you entered in the UI, not the new numbers you manually entered into the XML, just ignore them.
Again, I do not condone this behavior, but sometimes you just need ‘a fix’.
Thanks for reading this, I hope this will be useful to you.
Love to hear your feedback, query if any.
Don’t forget to subscribe for more upcoming Tips and Tricks.