1 Reply Latest reply on Sep 25, 2018 5:25 AM by Danilo Lion Estanqueiro Carvalho

# Calculating % versus % , Month versus Month

Hey Tableau experts!

I'm a beginner user and needing some help here!

I have a tableau where i show month after month brand shares.

So, the numbers are something like:

jan/18:

brand1 sales/total sales  = 20%

brand2 sales/total sales = 15%

fev/18:

brand1 sales/total sales  = 10%

brand2 sales/total sales = 20%

When trying to use table calculation tableau show the % variation of the absolute number os sales month vs last month, but i need to show the % vs %.

So

What tableau shows me the % dif between 'brand1 sales month/brand1 sales last month'.

and what i need:    the % dif between brand1 %sales month/ brand1 %sales last month.

Someone can help?

• ###### 1. Re: Calculating % versus % , Month versus Month

I figured out!

2 calculated fields:

Calc. Variation:  LOOKUP([%Participação],-1)

%Participação: SUM([Qtde])/TOTAL(SUM([Qtde]))

I Dragged "%Participação" to Text and Color in the table and then edited the formula manually to:  "%Participação" - Calc. Variation.

And then, adjusted de table calculations to horizontal/vertical.