Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There,
I am creating a chart trying to show the comparison of sales in the year user selected and the previous year. User can select multiple Order Dates (e.g. 01/01/2014,01/02/2014,01/03/2014,01/04,2014) to see how much sales generated in those days. I have successfully loaded a master calendar with Year, Month and Day associated with Order Date. When I list Year, Month and Day in listbox, it gives me 2014, Jan, 01,02,03,04. With all these conditions, how can I use expressions to get the sales in the period from 01/01/2013 to 01/04/2013?
Thank you so much!
Best Regards,
Gloria
Hi,
Try below
1. Current Year
=Sum({$<Month=, Date=, Year={$(=Only(Year))}>} Sales)
or
=sum({<Month=, Date=, Year={$(=max(Year))}>}Sales)
2. Previous Year
=Sum({$<Month=, Date=, Year={$(=Only(Year)-1)}>} Sales)
or
=sum({<Month=, Date=, Year={$(=max(Year)-1)}>}Sales)
Replace with appropriate field names.
Regards
ASHFAQ