Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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)
Something like
=(Sum({<Year = {2011}> Sales) - Sum({<Year = {2010}> Sales)) / Sum({<Year = {2011}> 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.
it should be like:-
[sum(current year)-sum(last year)]/sum(last year)
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....)
[sales(current year)-sales(last year)]/sales(last year)
yeah, I missed to post dynamically
try this
=(Sum({<Year = {"$(=max(Year))"}> Sales) - Sum({<Year = {"$(=max(Year)-1)"}> Sales)) / Sum({<Year = {"$(=max(Year))"}> Sales)