• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help with calculated field please - my example works, except for at Total level

Status
Not open for further replies.

ahn_photos

New Member
Hi everyone,

I have a file in which I'm comparing sales between 3 years: 2019, 2020 and 2021. In the pivot itself I want to see 2021 growth versus 2020 and versus 2019.

In order to do that, in the raw data I have included the following columns:
Year, quarter, Month, Category, Sub-category, Sales, 2019, 2020, 2021 (see below and attached)

For columns 2019, 2020 and 2021, the formula returns the value in the Sales column if the value in the Year column is the same, e.g. if in year it's 2019, the sales value will appear in the 2019 column and zero will reflect in 2020 and 2021 columns. I did this so that I could make a calculated field in the pivot table, for example:

Calculated field name: '21 vs. '20
Formula: ='2021'/'2020'-1

74263

At a monthly level, this works perfectly, but when I view the grand total in the pivot, growth is reflected as zero (see bottom right).

In the example, for Total '21 vs. '20, the value should be 8.23% but it's showing 0%:

74264

I will be super grateful if someone can help me figure this out.

Thank
 

Attachments

  • Calculated field example.xlsb
    97.4 KB · Views: 0
ahn_photos
Why did You duplicate Your thread?
You could give more details with the original one.
This thread is close.
 
Status
Not open for further replies.
Back
Top