Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I´m using the next expression to only show the last 5 weeks, when I select a date.
=Sum({<Date={">=$(=WeekStart(Max(Date)-28))<=$(=Max(Date))"}>}Sales)
But now, I only need to see weeks that are in the same month that selected date.
My Date field its like:
...
16/05/2016
23/05/2016
30/05/2016
...
Thank you in advance
Thank you stalwar1 and tresesco,
Finnaly the correct answer was:
=Sum({<Datefield={">=$(=MonthStart(Weekstart(datefield)))<=$(=Max(Datefield))"}>}[Sales)
With this expressión my chart only show weeks that are in month selected in date field.
In order words, if I select Datefield = 30/05/2016. My chart show only 5 weeks; and all of this weeks, Monday it´s in May.
Little bit strange but correct to my requirement.
May be like:
=Sum({<Date={">=$(=WeekStart(MonthStart(Max(Date))))<=$(=Date(Max(Date)))"}>}Sales)
Or may be this:
=Sum({<Date={">=$(=Date(WeekStart(Max(Date)-28), 'DD/MM/YYYY'))<=$(=Date(Max(Date), 'DD/MM/YYYY'))"}>}Sales)
Thank you stalwar1 and tresesco,
Finnaly the correct answer was:
=Sum({<Datefield={">=$(=MonthStart(Weekstart(datefield)))<=$(=Max(Datefield))"}>}[Sales)
With this expressión my chart only show weeks that are in month selected in date field.
In order words, if I select Datefield = 30/05/2016. My chart show only 5 weeks; and all of this weeks, Monday it´s in May.
Little bit strange but correct to my requirement.