Announcements
cancel
Showing results for
Did you mean:
Master

## Current Year vs Sum of previuos Year

Hi Folks,

i have a question: my table does look like:

Year, Turnover, Company

2018, 500, A

2017, 400, B

2016, 300, C

i am using this expression to show the turnover of current year:

Sum({<Year = {"\$(=Year(today()))"}>}Turnover)

my question is:

how can i show via set expression the sum of previous year (2017 + 2016 = 400 + 300)

i want to show the comparison like:

2018,   All Previous Years

500,             700

does anybody have any idea?

Thanks a lot

Beck

1 Solution

Accepted Solutions
MVP

My bad, I missed a closing double quote

Sum(TOTAL {<Year = {"\$(='<' & Year(Today()))"}>} Turnover)

6 Replies
MVP

May be this

Sum(TOTAL {<Year = {"\$(='<' & Year(Today()))}>} Turnover)

Master
Author

Hi Sunny,

thanks a lot for your help, i tried to implement that way, but it does not work

Beck

MVP

My bad, I missed a closing double quote

Sum(TOTAL {<Year = {"\$(='<' & Year(Today()))"}>} Turnover)

Master
Author

Sunny thanks a lot for your time and help

Contributor II

Hello good afternoon.

I was testing the problem you mentioned, I believe the problem is in the field for the year, I made a modification and added the date field of issue in the location of the year column.

EMISSION, Turnover, Company

05/05/2016, 500, A

05/05/2017, 400, B

05/05/2018, 300, C

EMISSION,

Date (EMISSION, 'YYYY') the YEAR,

Turnover,

Company

FROM

(ooxml, embedded labels, table is Plan1);

I used a text object with the following expression:

=num(sum({\$<[ANO]={"\$(=Year(Today())-1)"}>} Turnover)+sum({\$<[ANO]={"\$(=Year(Today()))"}>} Turnover),'#.#00,00')

If you create a column in the expression tab:

sum ({\$ <[YEAR] = {" \$ (= Year (Today ())-1) "}>} Turnover) + sum ({\$ <[YEAR] = {" \$ (= Year (Today ()) ) "}>} Turnover)

And it also works with:

= num (sum (TOTAL Turnover), '#. # 00,00')

But for the latter you would need a filter over the years, if you select one or more years, the sum follows the selection.

Hope this helps. Sorry if English is not perfect, I used the google translate.

Master
Author

Hey Rildo, thanks a lot for your help and time,

your way is very informative for me. Many Thanks

Tags
Community Browser