Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, does anybody know if there's a way to set the sum analisys of the las 3 mondays( of any other weekday) given a date.
Lets say I have the following table
I need a result table like the one in the rigth side.
Thanks in advance
sum({
<CalendarDate = {">=$(=DATE(FLOOR(WEEKSTART(MAX(CalendarDate),-2))))"}>
*
<CalendarDate = {"=WeekDay(CalendarDate)=0"} >
}SalesAmount)
** changed to sum instead of avg
Sum({<Calendate={"<=$(=Today())>=$(=date(Today()-20))"}>} if(WeekDay(Calendate)='mon', Amount))
sum({
<CalendarDate = {">=$(=DATE(FLOOR(WEEKSTART(MAX(CalendarDate),-2))))"}>
*
<CalendarDate = {"=WeekDay(CalendarDate)=0"} >
}SalesAmount)
** changed to sum instead of avg
Thank you both of you. The two ways are correct!! At least to me.
Glad it worked ... that one of the things with QV you can have several ways for getting the same results