
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Include the current year in Expression
Good day
I have the following expression:
Sum ({<Year = {'2017'}>} Cant_Vend)
What I need is to change the 2017 for a function that takes me the Current Year for a chart and on a following chart subtract one year and show me the year before.
I know I can use the lists as a filter, but that's how they request it.
Thanks for the reply.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be this
Current Year
Sum({<Year = {$(=Year(Today()))}>} Cant_Vend)
Previous Year
Sum({<Year = {$(=Year(Today())-1)}>} Cant_Vend)


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Juan,
for the current year you can use:
Sum ({<Year = {$(=Year(Today()))}>} Cant_Vend)
for the year before:
Sum ({<Year = {$(=Year(Today())-1)}>} Cant_Vend)
then:
Sum ({<Year = {$(=Year(Today())-2)}>} Cant_Vend)
and so on..
If you need a dynamic number of Charts (maybe different number of years), the "Trelllis..." option in the Dimension properties tab is maybe worthy to have a look for you.
Regards
André
