Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All, I am in the middle of working out an expression but I would like some help as I can't figure it out.
I have a Date filed in the form of "MM-YYYY" in a data island and when selecting a date I have an expression like so:
Sum({<Account_Date=P(MC_Date)>} PAGING_CPM)
which works fine even with the multiple selections (i.e May-2018, Jul-2018), but my issue is when I need to calculate the same for last year which I can't work it out. Can I do a set analysis inside the Possible to workout last year or is there any other solution?
Thank you in advance for your help.
Hi,
I've found the solution as below:
Sum({<Account_Date={$(vDateCal)}>} PAGING_CPM)
Where the vDateCal = CHR(39) & concat(AddYears(MC_Date,-1) & chr(39),',' & CHR(39))
works a treat, just in case someone comes across something similar.
Yup, This will work using Possible as well. Try this?
Sum({<Account_Date=P({<Account_Date={"$(=AddYears(Max(Account_Date), -1))"}>} MC_Date)>} PAGING_CPM)
Hi Loveisfail,
Unfortunately it doesn't work it only brought in the same sun as this year.
Kind regards,
Hi,
I've found the solution as below:
Sum({<Account_Date={$(vDateCal)}>} PAGING_CPM)
Where the vDateCal = CHR(39) & concat(AddYears(MC_Date,-1) & chr(39),',' & CHR(39))
works a treat, just in case someone comes across something similar.