Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi!
i currently have a dataset whereby i wish to show LY and CY values.
i am struggling however with a variable that should look at the previous year same date. It returns exactly the same value as the current year.
any help is greatly appreciated.
vSetPreviousYearDay
{$<Date= {"=$(=Date(MakeDate(Max(Year) - 1, Max([Month (#)]), Day(Max(Date))),'YYYY-MM-DD'))"}
>}
=Sum($(vSetPreviousYearDay)Sales)
maybe with AddYears, variable in bold
sum( {$<Date= {"=$(=Date(addyears(max(Date),-1),'YYYY-MM-DD'))"} >} Sales)
maybe with AddYears, variable in bold
sum( {$<Date= {"=$(=Date(addyears(max(Date),-1),'YYYY-MM-DD'))"} >} Sales)
Thank you for your reply,
if i were to choose two dates is there a possible variable that allows for that instead of a singular day?
example - 2015-09-01 and 2015-09-02
return sum of 2014-09-01 and 2014-09-02
maybe a union
sum(
{$
<Date={"$(=Date(addyears(max(Date),-1),'DD/MM/YYYY'))"}>
+
<Date={"$(=Date(addyears(min(Date),-1),'DD/MM/YYYY'))"}>
} Sales)