8 Replies Latest reply on Jul 2, 2012 7:20 AM by Ranjan Sahoo

# Unable to convert an aggregated measure into percent of total?

Hi,

I have a measure which is an aggregated one. i am putting the same into angle of a pie chart.

When i am trying to do quick table calculation, it is giving error.

Please find the attached report of sheet 14 and sheet 15

Thanks,

Ranjan

• ###### 1. Re: Unable to convert an aggregated measure into percent of total?

Hi Ranjan,

What table calculation are you trying to add?

-Tracy

• ###### 2. Re: Unable to convert an aggregated measure into percent of total?

I am selecting object in the angle then adding qucik table calculation then percent of total.

It is there in the attachment, it is showing error.The reason is the measure is already aggregated.

E.g, a= sum(b), then i am pulling a to angle and then adding percent of total.

Thanks,

Ranjan

• ###### 3. Re: Unable to convert an aggregated measure into percent of total?

Hi Ranjan,

Have a look at sheet 29 if this is what you are trying to achieve. I made up 2 new calc fields, and then applied the table calc to one of them in order to do it.

Hope it helps,

• ###### 4. Re: Unable to convert an aggregated measure into percent of total?

Thanks for your reply.I am unable to download the same right now due to some issue.can you post the calculation? why don't you try with the measure that i already applied on the Pie chart.

The aggregated measure.

"capability % for Chart" is refering to a measure "% G3 Total Stores for Chart".

% G3 Total Stores for Chart = sum([G3.x Totals])

When i am trying with "G3.x Totals" without summing, it is working fine. As the data is coming incorrect i am forced to go with summation.Here it is giving issue.

Can you please try on the same chart?

Thanks,

Ranjan

• ###### 5. Re: Unable to convert an aggregated measure into percent of total?

Hi Ranjan,

My calculation is [test]:

if([Capability] = "Software" or (startswith([Capability],"G") and int(mid([Capability],2,1))<=4)) then [McOpCo]+[O/O] else 0 end

this basically gives me the sum of [McOpCo]+[O/O] at the row level for th categories you are interested in, although it seems a bit elaborate.

Then putting this new measure on the angle shelf yields SUM([test]), to which you are able to apply the quick table calc. I believe th problem with your original measure comes from the conditional statement an the AGG aggregation, hence Tableau dos not know what is the "whole" in the denominator of the table calc you are trying to apply.

The other measure I created is a boolean to cut off the zeroes from the graph: [test]>0. Put his on the filter shelf and you are ready to go.

Cheers!

• ###### 6. Re: Unable to convert an aggregated measure into percent of total?

Thanks for your reply. I already tried the same. The data is coming incorrect, hence i have to do another level of aggregation before i put my data on angle. Your sum(test), you are getting in angle. But i am getting AGG(Variable).

On SUM(test), i can do percent of Total, But i am not getting the same when the angle is carryin the data agg().

Probably Tableau is not able to understand as Tableau calculates based on row for percent of total.

Any other idea?

Thanks,

Ranjan

• ###### 7. Re: Unable to convert an aggregated measure into percent of total?

I am not sure I understand prcisely what you are trying to achieve. Indeed Tableau is doing the table calc after the data is retrieved from the database and shown in th viz, i.e. only on the data that you see. Thus if you are trying to see how a subset of your data reltes to the total (part-to-whole analysis), andput these percentages in the pie chart, you will not succeed in this way.

If you have a look at sheet 31, I use duplicate of the connecton to show the "true" percents of th whole. The pie, however i misleading in this way, as theydo not add up to 100%. If this is what you are after, all credits go to (the great) Joe Mako and hi video:http://vimeo.com/19853548. If I'm still drifting away from your goal, please excuse my ignorance!

Hope this helps,

1 of 1 people found this helpful