Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

vanand3535
Contributor

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)

7 Replies
MVP
MVP

Re: how to find % change in total sales

Something like

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

vanand3535
Contributor

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.

vanand3535
Contributor

Re: how to find % change in total sales

it should be like:-

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

MVP
MVP

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....)

vanand3535
Contributor

Re: how to find % change in total sales

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

vanand3535
Contributor

Re: how to find % change in total sales

yeah, I missed to post dynamically

arulsettu
Honored Contributor III

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)

Community Browser