1 Reply Latest reply on Jul 30, 2017 6:51 PM by mara.quindoza

    Change legend alias and add 'n' row to chart

    Gautam Kok

      Hi all,


      I recently started using Tableau and am deeply impressed. It's exactly what I have been looking for to visualize the data for my review article. However, I'm running into two (three) problems.


      Let me explain to you how I have set up my data. On the left, the first two columns (Excel) are Symptom group and Symptom. The first two rows contain the title of the diseases and the number of articles included 'n'. The data consists of the following:

      . = data not reported

      0 = symptom not occuring

      1 = symptom ≤ 1/3rd of patients

      2 = symptom ≤ 2/3rd of patients

      3 = symptom > 2/3rd of patients


      Excel sheet looks like this:


      I have created a text table and as marks have 'measure values' as color (this creates a gradient from 0-3). Row headers are Symptom group/Symptoms. Column headers are the disease names. 'N' I have excluded, because this would mess with the gradient (which I have manually set to 0-3, by the way).


      My chart looks like this:


      The legend looks like this:



      1) How do I add a row 'N', that does not show a circle with a gradient color, but just the number for each column?

      2) How do I add an extra row 'references', where I can add the numbers of the references for each column (at the end?)

      3) How do I change the legend to display each color, and instead of the number, show the no. of patients (0, ≤ 1/3rd, ≤ 2/3rd, > 2/3rd)? Like when I choose 'size' instead of 'color', but then with the text instead of the numbers, see below:



      An option to edit the legend alias is not available:


      Thank you all in advance,




        • 1. Re: Change legend alias and add 'n' row to chart

          Hello Gautam Kok!


          You cannot add a row on the same sheet/chart as the 'n' is not the sum of your 0s, 1s, 2s or 3s.

          What you can do is to create a calculated field which says : IF [Column]="ASNS" then 16 else if [Column]=.... END"

          Once this is created, create a new sheet, drag the disease name as column and then drag the calculated field as text/label. You can hide the headers for the columns.


          Then create a new dashboard and then put or stack the two separate sheets on top of each other.

          Hope this helps. Thanks!