Here's a quick way to create a custom legend:
In Excel, create a column, let's call it 'Legend' and place the names that you want to have appear in your legend in that column.
Either Save the file or Paste the data in Tableau.
Tableau will automatically open a new sheet (if you chose to paste the data).
Move the 'Legend' dimension pill to the Colors shelf on the Marks card,
Then click on the drop down arrow on the Legend shelf, and select the color palette you want.
Now you can add this sheet to your dashboard. You can either leave the sheet static or floating (for more flexibility).
Hope this helps.
Thanks Don for your quick response but what I want is
I would like to have text besides all above box on the sheet
Like Eg. Red Text 1, Yellow Text 2, Green Text 3
Can we make it?
Just place the 'Legend' pill on the Row shelf and another one on the Label shelf of the Marks card.
Then you can change up where you want the text to appear (left or right of the box).
You can also hide the actual sheet, then just use the legend.
I've attached an example.
Custom Legend.twbx 7.1 KB