9 Replies Latest reply on Jul 27, 2016 11:16 AM by John Sobczak

# Contribution to growth

Hello, I am starting in Tableau now and I'm still learning how to use it. Could anyone help me with a calculation, please?

I would to calculate the contribution of different regions sales growth to total country growth in the same period. In Excel, this is how I would do it:

((Sales Week 2 Region A) - (Sales Week 1 Region A) / (Sales Week 1 Total)) --> so the Sum of all regions is equal to Sales growth of Total Country. • ###### 1. Re: Contribution to growth

Assuming your weeks are in ONE date dimension then using Table calcs it should be something like  (sum([sales]) - lookup(sum([sales]), -1)) / total(sum([sales]))

• ###### 2. Re: Contribution to growth

Thanks for your help, but it didn't work. Here is the print screen of my Tableau data. My Periods are grouped in one Date and I have 5 regions. • ###### 3. Re: Contribution to growth

Ah ha!  I needed to separate the table calcs into TWO separate calculated fields so they could be addressed independently.  See the attached workbook.  This uses a nested table calc and in what I call the "Rubik's cube" settings of table calcs.

• ###### 4. Re: Contribution to growth

See this example.

• ###### 5. Re: Contribution to growth

And of course there is usually more than one way to get to result which I have attached using an LOD also.

• ###### 6. Re: Contribution to growth

That worked perfectly! Thanks so much! If it isn't too much to ask, I am now trying to build a graphic with the data. However, I would need to hide 2015 because it has no data. Do you know how to do this?