Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm trying to display number on chart. Those number are monthly sales from the current year compare with the last year.
To display the current year; no problem ; --> Sum([Gross Order]
But to display the one from previous year, I don't get it;
I have try
WIth the year : Sum({<Year={$(=max(Year)-1)}>}[Gross Order])
or with the month : Sum({<Month={$(=max(Month)-12)}>}[Gross Order])
None of them works.
Can anyone help me?
P.S. : The dimension I have is DATE which is on the format dd/mm/yy .
Thanks in advance
Maybe Use
if(InYear(TempDate, today(),-1), 1, 0) as LastYearFlag,
In your Master Calendar script and in front end
Sum({<LastYearFlag={1}>}[Gross Order])
I'm not sure if it will work or no...
To get the Gross order Value of the Previous Year when you click on the current year
Use this expression:
Sum({$<Year={$(=max(Year)-1)}>}[Gross Order])
Hi
Thanks for the help. Almost the same as what I try but unfortunately, it doesn't work...
It looks like it doesn't take into account the "(Year)-1".
try Sum({<Year={'$(=max(Year)-1)'}>}[Gross Order])
or create flags
Period Presets: Compare Periods on the fly
Sum({<Year={$(=max(Year)-1)}>}[Gross Order]). This will not wok unless u have selection on Date dimension. So
please use below
Sum({<Year={$(=max({1}Year)-1)}>}[Gross Order]). Let us know incase of any issues.