2 Replies Latest reply on Jan 8, 2019 6:28 AM by craig Webb

Divide a Dimension by a Field Within Same Dimension

Hello,

I am trying to divide the POS dimension to get a %age of Total Calculation. I am unable to use the Quick Table Calculation provided in Tableau as the Sum of Transactions is not the true total of transactions. The sum of transactions if aggregated would be overstated as each as an individual transaction could contain each POS. For this reason i created a POS called TOTAL. What i would like to do is Divide each POS by the Total POS for Sales and Transactions.

I have came close using the Fixed function but i am not quite there.

• 1. Re: Divide a Dimension by a Field Within Same Dimension

Hi Craig,

Create two calcs below:

• 2. Re: Divide a Dimension by a Field Within Same Dimension

Thanks for the reply Albert, however this will not work in my scenario. As i mentioned in my write up above. I cannot sum transactions for a couple reasons. One being that in the industry i am in, the same transaction can appear in any of the POS listed in my exmple, therefore if i summed transactions across POS it would double count transaction amount. Second, because of the reason i just stated i created a POS called Total, so therefore if i summed sales and transactions it would again double count everything.

I need a calculation where i can divide within the POS Dimenstion for example (Meat/Total), then (Seafood/Total) and so on.