6 Replies Latest reply on Jan 21, 2014 8:12 AM by Manas Ranjan Kar

# How can i compare my sales in a monthly basis

Hi All,

I need to compare my company sales between Jan 13 and Jan14 and consequently for the next future months. How can i do this ?

I have try so may things and nothing solve my problem.

Hope anyone could help me.

Regards,

Renato Rocha

• ###### 1. Re: How can i compare my sales in a monthly basis

Can you re-phrase your question?  What exactly are you trying to do?  Perhaps a mock up of your expected results would help us help you--thanks!

• ###### 2. Re: Re: How can i compare my sales in a monthly basis

Hi Matthew,

Follow attached, the idea that i want to do in excel.

Regards,

Renato Rocha

• ###### 3. Re: Re: How can i compare my sales in a monthly basis

Are you wanting this in a separate sheet?  I only see the one sheet "Sales Comparative" in your workbook and don't think this comparison belongs there.  I'm still unclear on what you want to do.

• ###### 4. Re: Re: How can i compare my sales in a monthly basis

Also, I am confused when you say "Jan 13" and "Jan 14".  To me, I see those as two dates, January 13th, and January 14th.  I assume you are referring to January 2013 and January 2014

• ###### 5. Re: Re: Re: How can i compare my sales in a monthly basis

Here's one way to visualize what you are asking for (I think)--however, the values listed in your Excel file do not match the data in this data set.  There are values missing in each year for several product groups.  See attached 8.1 workbook for an example showing the percent difference between January of 2013 and January of 2014.  I have explicitly defined the "Percent Difference from Last Year" as a calculated field so you can see the formula, but I used the quick table calculation option for "Percent Difference" to set it up--there are many resources for setting up percent difference calcs in Tableau, but here is one for you to examine: Percent Difference From Calculation

I also filtered 2013 to only show the month of January, since that is the only month you listed for the comparison you wanted.

I hope this helps.  Best of luck.

1 of 1 people found this helpful
• ###### 6. Re: How can i compare my sales in a monthly basis

Hi,

I have created two fields

1. Difference (MoM) - Computed using Table Across

```IIF(ISNULL((LOOKUP(SUM([Valor Líquido]),0)-LOOKUP(SUM([Valor Líquido]),-12))),
LOOKUP(SUM([Valor Líquido]),0),
(LOOKUP(SUM([Valor Líquido]),0)-LOOKUP(SUM([Valor Líquido]),-12)))

```

2. Percentage Growth (MoM) - Computed using Table Across

```IIF(([Difference (MoM)]/LOOKUP(SUM([Valor Líquido]),-12))=0,
ATTR(INT([CFOP Vendas]))
,([Difference (MoM)]/LOOKUP(SUM([Valor Líquido]),-12)))

```

ATTR(INT([CFOP Vendas])) has been used to take care of the zeros and give a cleaner look. This formula will give you a difference YoY as desired. This is something similar to another discussion I participated in

Year on year change where reference / base periods varies

Hope that this is an acceptable solution.

P.S: Matt Lutton, your feedback on my process would be greatly appreciated. Thanks in advance !!