Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to sum last years sales for the same period as selected for this year and have the following expression:
=sum({<Datefield= {">=$(=Addmonths(min(Datefield)),-12)<=$(=Addmonths(max(Datefield)),-12)"}> } Sales)
For example, if selected dates are 20190101, 20190201 and 20190301 I want to sum sales between 20180101 and 20180301.
Date field format is 'YYYYYMMDD' and I have one date per month to select from: 20190101, 20190201 and so on.
I can't figure out why the expression is not working, and would be very thankful for any help.
Kind regards, Hilde
hi
you need to make sure
that the function inside the set analysis returns the date in the same format as your date field
so try adding date around your function and format it