-->

How to display 40 + columns in Tableau?

2020-05-19 09:22发布

问题:

I am trying to do a list report with about 40 columns(Dims+measure) but not able to get it right, the requirement pushes the Tableau limitation by exploiting its limit to only 16 columns.

How can I get this done?

I read this

Here is my Tableau workbook with 16+ columns but no column header

回答1:

Go to Analysis-->Table Layout -->Advanced and change the number in Rows and Columns as per your need.

You can't add more than 16 to this, but increase it to 16 (for identification). So, save the Tableau file with extension .TWB. Then open this file in notepad.

Then search for the text: attr='row-levels'.

You will find something like:

<format attr='row-levels' value='16' />
          <format attr='row-horiz-levels' value='16' />

Change the value of 16 to desired column numbers. Save the notepad file. Open it in Tableau.



回答2:

The measures names and measures values special fields can help here and covers most use cases. (Using the measure names and values fields is likely a better choice than creating 40+ marks cards as you did in your posted example)

Put Measure Names on the column and filter shelves and measure values on the text shelf. Then add the measure fields you want to the Measures Values shelf. Then put the dimensions that you wish on the rows shelf.

A single field+aggregation can only be on the Measure Values shelf once, but a field can repeat with different aggregations -- so you can show the min, avg and max of a measure in 3 different columns.

As you mentioned, you can increase the max col and row headers up to 16 each via the Analysis->Table Layout->Advanced menu and panel. Beyond that point, adjacent columns will still display, just be coalesced for display.

Still you can have an apparently arbitrary number of fields on the measures values shelf, so can display as many columns of measures (data) as you wish, even though adjacent header columns for dimension (~category) get coalesced for display once you hit the header limit.

Tableau is optimized for summarizing data for efficient interpretation by humans, so displaying extremely wide tables of data is not the best fit for the tool (or a human reader frankly). Importing and exporting large tables is certainly possible.



回答3:

At the 2015 conference I went to a session called "Use Tableau Like a Sith" and they showed us how to change the XML to workaround the 16 limit. Caveat being this is not supported.

Find the entries in the attached image and change their value to 40. In the screenshot, the Sith presenters were changing them to 36.



回答4:

Here is a workaround for some data sets:

  • convert your fields from Dimension to Measure, and then
  • display using Measure Names / Measure Values, as @Alex Blakemore suggested.

For example, Boolean fields can be converted to numeric using INT().

PROS:

  1. It is easier to change which fields to plot using Measure Names / Measure Values.
  2. Faster performance, at least for some data sets.

CONS:

  1. Often data sets have some fields that cannot or should not be converted to measure.
  2. Not as easy or straightforward as changing Analysis > Table Layout > Advanced settings, or the xml-editing workaround suggested by @Cyndi1976.


回答5:

There are Two ways:

  1. Edit the saved .twb file and edit the Below xml code by opening the workbook with Notepad

      <format attr='row-levels' value='16' />
      <format attr='row-horiz-levels' value='16' />
    
  2. Create 3 different worksheets each consisting multiple column but each worksheet consisting columns >16 and place them in single dashboard. So you will get one view with 40 columns.



回答6:

A good way to do this is to create groups and filters. I'm sure, out of 40+ columns, a good number of them can be converted to either of the above, giving a neater look to your dashboard, making it easy to comprehend your data.

Let us assume you're creating a dashboard to show the overall split of mobile recharges for a company x.

One of the option is to have multiple columns; each for:

  1. the mobile OS
  2. OS version
  3. service provider
  4. recharge rank
  5. Sub-category (Prepaid / Postpaid)

...

the easier and elegant way to reduce the number of columns is to populate a dropdown list with these values. Not only this will make the dashboard easier to comprehend, it will reduce the number of columns one has to refer to interpret the data and would also reduce the technical limitations imposed on the number of columns.

to create a group in Tableau:

  1. include the fields in the result set i.e. use the column[s] in select statement.

select os, os_version, service_provider, rank, subcategory ... from schema.recharge_table [where...];

  1. In the Sheets view of Tableau, right click on the field to create group. Let's create a split on subcategory.

  2. Group the sub-categories, give them proper alias to be recognised easily.

  1. Drag the Group to filter and you've successfully and elegantly reduced one column.



回答7:

16 is the maximum limit for row/column labels in tableau table.



回答8:

Put 20 columns on one sheet and 20 one the other dashabord. Drag and drop both sheets on to your dashbaord, and you should be having 40 columsn.



标签: tableau