# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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

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

Something like

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

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.

Contributor

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

it should be like:-

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

MVP

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

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

Contributor

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

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

Contributor

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

yeah, I missed to post dynamically

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)