Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
TomBond77
Specialist

calculate current year

Hi experts

I have a dimension Year DD which has values, e.g. 2022, 2023, 2024, 2025, etc. Now I need the amount values for this year 2023.

Sum({<[Table.Year DD]={$(=year(today())}>} Amount)

This formula works: Sum({<[Table.Year DD]={'2023'}>} Amount) but the above one not.

Any ideas?

thank you, Tom

1 Solution

Accepted Solutions
brunobertels
Master

 

hi 

in this fomula you said the year of the day before today : year(today()-1))

use instead : 

year(today())-1

Sum({<[Table.Year DD]={'$(=year(today())-1)'}>} Amount)

View solution in original post

3 Replies
brunobertels
Master

may be like that 

 

Sum({<[Table.Year DD]={'$(=year(today())'}>} Amount)

TomBond77
Specialist
Author

Thank you, this works fineè

What's about the previous year?

This formula seems to ignore the offset of one year to get the previous year:

Sum({<[Table.Year DD]={'$(=year(today()-1))'}>} Amount)

Any ideas? Thank you, Thom

brunobertels
Master

 

hi 

in this fomula you said the year of the day before today : year(today()-1))

use instead : 

year(today())-1

Sum({<[Table.Year DD]={'$(=year(today())-1)'}>} Amount)