1
votes

I would like to use Tableau to create a bar plot for score of students. The column variable is student name which contains more than 100 names. Therefore when Tableau generate the plot, it will only show limited names as headers. Currently Tableau shows headers by its own selection.

My question is can I select a small group of levels and force Tableau to show them as headers?

For example, suppose I have a table where:

  1. Columns is '1' - '100' (In string type representing the names)

  2. Values for each level is 1 - 100 respectively

The output bar plot looks like the following picture: Barplot of sample data

You can see that the x-axis header shows 3, 7, 11, ..., 99.

Can I force it to show 1, 10, 20, 30, ..., 100?

2

2 Answers

0
votes

First, create a calculated field to have the label you prefer, and return null or empty string if you don't want to show the label. If you original field is numeric, the calculation for your "label" field could be as simple as if [Column] % 10 = 0 then [Column] end The "else null" is implied. Make sure your new field is also discrete.

Then, place your new label field to the right of the original field on the Column shelf, and select the original field on the Column shelf and turn off "Show Header".

You may still have to play with the font size, alignment and column width to get the display to appear as you like.

Alternatively, if the original field is a numeric or date type, you can change the original field to be continuous in this case and then edit the axis to control the origin and spacing of the tick marks. That may be easier.

0
votes

Right click on the header and choose Edit Axis. Choose the Tick Marks tab. Under major marks, choose Fixed and choose 10 for the number of units.

http://onlinehelp.tableau.com/current/pro/desktop/en-us/formatting_editaxes.html

Edit: Make sure your Columns dimension is a continuous field. Since it's numeric, right click on the dimension and choose Continuous. If the field isn't numeric but is a string, right click and change the data type.