Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
francisvandergr
Partner - Creator II
Partner - Creator II

Sum from This Year and Last year in Straight table

Hello,

I have a question. Can someone help me. On this forum i seer only cases with a sum t/m a period. What i want is a sum in a column what presents the sum of all records from the selected year. And in another column i want a sum of the records from the selected year -1.

I have included a qvw file. I hope someone knows this, because i can use this formule in future often.

The result has to be: (when i select 2010)

2010 2009

Reknr 7000 3000 1150

Reknr 8000 50 200

1 Solution

Accepted Solutions
Not applicable

maybe Sum( {$} Amount)

View solution in original post

6 Replies
Not applicable

maybe Sum( {$} Amount)
francisvandergr
Partner - Creator II
Partner - Creator II
Author

Sorry fabio that doesn't work for last year

Not applicable

In your chart.....you need create two expressions......

1st take a select year or higher

=SUM({$<YEAR={$(=MAX(YEAR))}>} Amount)

2nd Selected year -1 or second higher

=SUM({$<YEAR={$(=MAX(YEAR)-1)}>} Amount)

Try this, if you have some doubt ask me!!!

Not applicable

...
Not applicable

You want:

Sum ({<Boekjaar = {$(=max(Boekjaar)-1)}>}Amount)


That will give you the sum for the year before the max selected year.

francisvandergr
Partner - Creator II
Partner - Creator II
Author

all thnx for the excellent help !!!!