Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I do have the below data, my requirement is to write a set analysis expression in a textbox to get sum of sales for all the previous years by eliminating the current year. So the output value which I'm looking is only '7200'.
Sum of sales for all the years is 7800 but sum of sales for previous years by eliminating current year is 7200
Date | Sales |
01-01-2021 | 100 |
02-02-2021 | 200 |
03-03-2021 | 300 |
04-10-2020 | 400 |
07-09-2020 | 500 |
24-08-2020 | 600 |
04-10-2019 | 700 |
07-09-2019 | 800 |
24-08-2019 | 900 |
04-10-2018 | 1000 |
07-09-2018 | 1100 |
24-08-2018 | 1200 |
Regards,
Vikas
Try like:
=Sum({<Date-={"=Year(Date)=Year(Today())"}>}Sales)
Or, if you already have a year field
=Sum({<Year-={'$(=Year(Today()))'}>}Sales)
Try like:
=Sum({<Date-={"=Year(Date)=Year(Today())"}>}Sales)
Or, if you already have a year field
=Sum({<Year-={'$(=Year(Today()))'}>}Sales)
Thanks for that, it is working as I expected.