WEBI - Relative Week Support

Hello Team,

I’m currently using the relative week calculation as below (I know its a bit old school):
=DaysBetween(LastDayOfWeek([Date]);LastDayOfWeek(CurrentDate()))/7

I want my chart and graph to show the previous 4 weeks of data.
In a standard period of the year, a filter of this variable results 1,2,3,4 will achieve this.
However, we have only have 2 weeks of data in 2021, therefore I would want it to also show the 2 weeks of data prior to this (which happens to be 6 and 7 weeks ago).

Does anyone know what I can do to achieve this, so that I don’t have to change the filters constantly?
I would also use the solution for months and days to remove weekends and non-reporting months.

Hi Corey,

Try this =DaysBetween(LastDayOfWeek([Date]);LastDayOfWeek(CurrentDate());WeekPeriod)

Thanks,
Mohammed

@Mohammed:
DaysBetween() is only working with 2 dates, the parameter “WeekPeriod” belongs to RelativeDate()

@CoreyLFH:
please use RelativeDate(…, …, WeekPeriod) to go to any target date/week,
so you can check with different variables if there is any data in the desired time-range or week
and then show your 4,5,6 or 7 weeks ago