It sounds like you could use the Text expression column. Here is an example with a Pie chart.
The data has one text column and one number column. The column ‘Percentages’ is a Number from command column that uses a Pie command to calculate the percentages. The column ‘Legend’ is the Text Expression column. This is added using the Other drop-down menu above the column list. Here, you can combine text and column entries. The blue entries in the text expression are tokens. Add the tokens using the + symbol on the right side of the text box.
Here is the list of corresponding commands and the final graph. Note the first Pie command is used to output the percentages and is not drawn. A second Pie command has Values = ‘data’ and Names = ‘Legend’.
Note that we could have calculated the percentages in the data table, but it is convenient to use the pie command itself because there are rules for rounding already built into the pie command. Also, we cannot do this in just one pie command because it will end up with a circular reference.
This example is a bit specific to the pie command, but hopefully this gives you some ideas. If you’re still stuck, let us know.