Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a report with a simple List Chart that sums Net Value. I also have Calendar_Year as a field, so that multiple years can be selected. And I have this expression to calculate the previous selected year:
sum({$<Calendar_Year={"$(=ONLY(Calendar_Year)-1)"}>} DocumentRows.LineTotal)
But this won't work when multiple years are selected.
Do you know a way to calculate the sum of the previous years when multiple years are selected?
Kind Regards
Julian
Hi Julian,
You can use this:
sum({$<Calendar_Year={"$(=max(Calendar_Year)-1)"}>} DocumentRows.LineTotal)
or if you want the sum of all previous years try this:
sum({$<Calendar_Year={"<=$(=max(Calendar_Year)-1)>=$(=min(Calendar_Year)-1)"}>} DocumentRows.LineTotal)
Hope this helps
Regards!
Hi Julian,
You can use this:
sum({$<Calendar_Year={"$(=max(Calendar_Year)-1)"}>} DocumentRows.LineTotal)
or if you want the sum of all previous years try this:
sum({$<Calendar_Year={"<=$(=max(Calendar_Year)-1)>=$(=min(Calendar_Year)-1)"}>} DocumentRows.LineTotal)
Hope this helps
Regards!
Thanks a lot Gabriela!
What I was looking for was your second anwer and it works like a charm!!
Kind Regards