Skip navigation

Use Measure Values in calculated fields

score 375
You have not voted. Active

It would be a huge time saver if it were possible to use [Measure Values] in calculated fields.



SUM([Measure Values]) / SUM([Number of Records])


This would be extremely useful for multiple-choice questions in survey data, for example. For this type of data, you need to manually create many similar calculated fields and use Measure Names and Measure Values in your views. If a survey has a large number of multiple-choice questions, hundreds of calculated fields may be needed. In the following simple example, I am creating calculated fields that tell me what share of respondents like TV, Internet and music:



shareLikesTV:     SUM([I like TV]) / SUM([Number of Records])

shareLikesInternet:     SUM([I like Internet]) / SUM([Number of Records])

shareLikesMusic:     SUM([I like music]) / SUM([Number of Records])



You can see that the above calculations are essentially all the same. The only difference is that I am using a different measure in each case. Instead of all this tiresome work, it would be much better if it were possible to create just one calculated field, shareMeasureValues say, like this:


shareMeasureValues:     SUM([Measure Values]) / SUM([Number of Records])


To create the view, I would drag Measure Names into the rows, say. Then, instead of using Measure Values in the columns, I would use my new shareMeasureValues calculation instead. Essentially, this is a small extension of the current Measue Names/Values behaviour of Tableau, but it would make it much more powerful. I used a simple calculation in the example above, but I am often using more complicated calculations too.


Currently, the solution that Tableau Software recommends for this problem is “reshaping the data”, which is time consuming, impractical and only works for Excel files (


Vote history