Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I compare mobile year sales?
I would like to be able to compare the sales of the last 12 months (YTD) against the previous 12 (LYTD). Since the last date inserted.
Data and sales
Hi
try:
YTD
sum(
{<
date_dim = {">=$(=YearStart(MAX(date_dim)))<=$(=MonthEnd(MAX(date_dim)))"}
>}
sales
)
LYTD
sum(
{<
date_dim = {">=$(=YearStart(MAX(date_dim),-1))<=$(=MonthEnd(MAX(date_dim),-12))"}
>}
sales
)
Regards
Did the expression work?