Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear community,
I am trying to compare the data from this year vs LY. I know it seems pretty simple, but I can´t get it...
My final graph should look like this:
Day | This Year | Last Year |
01/01/2018 | 100 | 90 |
02/01/2018 | 139 | 175 |
03/01/2018 | 147 | 200 |
04/01/2018 | 140 | 160 |
I am trying with the following expression, but I don´t get any result:
Sum( {$< Day ={$(=Date(Only(Day)-365,'DD/MM/YYYY'))}>} Revenue)
Thanks for the help!
Try something like this: sum({< Revenue = {"=Day=date(Day-365, 'DD/MM/YYYY)"}>} Revenue)
- Marcus
Perhaps this?
Create Field in script like
Year(Day) as Year
And then use this
CY - Sum({<Year = {$(=Year(Today()))}>} Revenue)
LY - Sum({<Year = {$(=Max(Year))>} Revenue)
Perhaps You need AsOfTable technique, like this
Table:
LOAD * Inline [
Day,Revenue
01/01/2018,10
02/02/2018,20
03/03/2018,30
04/04/2018,40
01/01/2017,11
02/02/2017,21
03/03/2017,31
04/04/2017,41
];
Temp:
LOAD DISTINCT Day Resident Table;
Join (Temp) LOAD Day as AsOfDay Resident Temp;
LOAD Day,AsOfDay,AsOfDay-Day as DayDiff
Resident Temp
Where AsOfDay >= Day;
Drop Table Temp;
Regards,
Antonio