7 Replies Latest reply: Apr 30, 2018 5:13 AM by arul settu

# how to find % change in total sales

Hi everyone,

I want to find total % change in my sales since previous year like:

How can I apply this formula?

[Sales(2011)-sales(2010)] / sales(2010)

• ###### Re: how to find % change in total sales

Something like

=(Sum({<Year = {2011}> Sales) - Sum({<Year = {2010}> Sales)) / Sum({<Year = {2011}> Sales)

• ###### Re: how to find % change in total sales

I know this but

I don't want to  write year hard coded . I want it by dynamically.

Because I have table with year 2011,2012,2013,2014

So it should calculate % change for every year automatically.

• ###### Re: how to find % change in total sales

You did not ask for that in your original post.

Then you need to specify how you would like to set the dates dymanically (eg today, latest date in model, latest date - 1....)

• ###### Re: how to find % change in total sales

yeah, I missed to post dynamically

• ###### Re: how to find % change in total sales

it should be like:-

[sum(current year)-sum(last year)]/sum(last year)

• ###### Re: how to find % change in total sales

[sales(current year)-sales(last year)]/sales(last year)

• ###### Re: how to find % change in total sales

try this

=(Sum({<Year = {"\$(=max(Year))"}> Sales) - Sum({<Year = {"\$(=max(Year)-1)"}> Sales)) / Sum({<Year = {"\$(=max(Year))"}> Sales)