1
votes

I'm a new user of Tableau and have a question regarding measured names and values.

I've got a table that consists of user_id, column A, column B, column C. The user id is a unique number and remaining columns add together to total 1 for each user. I have several thousand users and want to total the values in each of the columns into a histogram style chart that displays the percentage totals (eg A 23%, B 56%, C 21%).

The only way so far that I've been able to do this is by filtering measured names and values to display only these three columns and select SUM() to provide the total. I cannot see a way to get these independent values to work together and provide the combined percentage numbers like you can in the percentage of table option in Analysis.

Any help / advice is appreciated.

1

1 Answers

2
votes

Well, problem is you have a table that is not in a database format. Meaning, if A, B and C measures are the same thing (under different labels, for different classifications, or something like that), they should all be in the same field.

So your table should look like:

id    field     measure
1     A         0.5
1     B         0.3
1     C         0.2

so Tableau could easily read it and compare. Tableau was not build to mix measures in the same chart. If you know Excel Pivot Tables, you should ask yourelf: "Could I run a pivot on this table and get what I want?". If the answer is no, your table is probably on the wrong format

In my example, to build your chart you would just have to drag 'measure' to rows and 'field' to columns. Then just put everything as % of total.

One thing you can do (apart from changing your data source), is to create 3 individual sheets. Each one would just have one bar, that is sum(A)/sum(Number of Records), assuming your numbers do add up to 1 (of course you would have A, B or C in the numerator). Then put those sheets side by side in a dashboard, and with a little formatting you would have your chart.

Not elegant, not beautiful, but it works.