Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Decrement sum of sales per year

Hi!

I have a bar chart, with sum sales per year.

My problem is that i lose clients as the years increase. i want to make  an acomulate sum with the clients.

For example

i have 3 clients, and Sum(Sales) are 120 millons in 2015.

In 2016 i lose 1 client and the Sum(Sales) are 100millions.

The information in my table is:

Client

ClientYearSales

Client 1

201520
Client 2201650
Client 3201750

Something like that

Capture.PNG

Thanks for all

3 Replies
Highlighted
MVP & Luminary
MVP & Luminary

Re: Decrement sum of sales per year

Try this expression: sum(total Sales) - rangesum(above(sum(Sales),1,rowno()))


talk is cheap, supply exceeds demand
Highlighted
Not applicable

Re: Decrement sum of sales per year

Sorry but It doesn´t work, y take negative values.

The year is the year y lose de client.

what is "total sales"?

thanks

Highlighted

Re: Decrement sum of sales per year

Gysbert's expression seems to be working here:

Capture.PNG