7 Replies Latest reply on Aug 7, 2012 4:45 PM by Shawn Wallwork

# Using "Measure Values" as basis for a Table Calculation

Hi, I'd like to Show Percent of Total on a stacked Bar chart (created using Measure Names/Measure Values for blending)

[eg]

date          A    B

1/1/2000   100  50

2/1/2000   500  25

I figured that since I use Measure Values on the Label shelf to show the absolute value on the bars, I could create a Table Calculation on that to generate and show the Percent of the Total of each bar... But it doesn't appear that I can add a Table calculation using Measure Values, so I'm stumped.  [This is the only way That I know to access the blended data]

Is there another way? or something fundamental I'm missing about how to access the data relating to the measure currently being referred to?

Thanks!

JWitt

• ###### 1. Re: Using "Measure Values" as basis for a Table Calculation

You need to save your data source as a tbwx - this one does not contain the data

• ###### 2. Re: Using "Measure Values" as basis for a Table Calculation

Oops~ Attached

• ###### 3. Re: Using "Measure Values" as basis for a Table Calculation

In an ideal world, you may want to look at reshaping the data to:

date Identifier Value

1/1/11 A  23

1/1/11 B 34

etc.

but easily done anyway with two simple calcs (not even table calcs):

sum([A])/(sum([A])+sum([B]))

sum([B])/(sum([A])+sum([B]))

• ###### 4. Re: Using "Measure Values" as basis for a Table Calculation

Gotcha, and Thanks for that.  I suppose I should have mentioned that I need to keep the Y-Axis showing the absolute value (SUM[A]+SUM[B]), while printing the %Total on the individual bars to give a quick feel for the split.

I eventually wandered down the path of using Measure Values in Calculated Fields (table calcs or otherwise), because, I assumed I needed that to set up a calculation that selected from the components of blended data.

So, I guess my real question(s) become.. How do I set the Mark Label Shelf to select between multiple calculated fields? [EG: A/A+B WHEN talking about A Values and B/A+B for B Values...]?

How would I use a different Measure for the Y-Axis than the calculation applied to the Measure Value on the Label shelf?

• ###### 5. Re: Using "Measure Values" as basis for a Table Calculation

Did you find a solution to this problem? I am having the same issue and can not restructure my data vertically as I run up against data limitations when posting to the public server.

• ###### 6. Re: Using "Measure Values" as basis for a Table Calculation

Hi, No.. I never solved this one.

However there is an existing IDEA to vote up

http://community.tableau.com/ideas/1087

which would allow us to hack our way to the desired visualization anyway with a dual axis graph..... If it got implemented.

JWitt

• ###### 7. Re: Using "Measure Values" as basis for a Table Calculation

Here's the Idea Jeremy was trying to link to. Also you can vote for exposing the Measure Variables.

--Shawn