5 Replies Latest reply on Nov 24, 2014 12:24 PM by Tom W

# Calculation for seeing the difference in revenue compared to previous year

Situation: I would like to analyze my customer’s data. I have customer names and there revenue contribution for the last 2yrs I want to create calculation field that shows the difference in revenue when compared to previous year.

Ex:

Customer Name                     Tot Rev, 2013                        Tot Rev,2014                      Difference in 2014 Revenue

ABC                                           \$100.00                              \$80.00                                    \$(20.00)

I have tried using this in the calculation field: ZN(SUM([Total Revenue])) - LOOKUP(ZN(SUM([Total Revenue])), -1) but this is not giving me the result that I am expecting.

Any help will be greatly appreciated.

• ###### 1. Re: Calculation for seeing the difference in revenue compared to previous year

Can you attach a Tableau Packaged Workbook please?

• ###### 2. Re: Calculation for seeing the difference in revenue compared to previous year

Don't you just need to do as below?

Or is this too trivial and I am missing something??

• ###### 3. Re: Calculation for seeing the difference in revenue compared to previous year

Pooja, You got what exactly i am looking for. But Revenue is one field "Total Revenue" i also have a date field also

• ###### 4. Re: Calculation for seeing the difference in revenue compared to previous year

Tom, I wish i could but the data is confidential. So i couldn't attach a package

• ###### 5. Re: Calculation for seeing the difference in revenue compared to previous year

Nani,

You can definitely put together an example which demonstrates the same file structure including some sample data without exposing anything confidential.

You should check out the suggested readings on the forum homepage;