Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I am brand new to Qlikview.
I am trying to write an expression that will do the following;
SUM all sales within the last full week. This needs to roll forward in real time.
For example as of today 'last week' would include 05/03/18 - 11/03/18. The following week it will filter between 12/03/18 - 18/03/18
The fields within my source data are 'Sales' and 'DocDate'
Hi,
Try:
=Sum({<Week = {'$(=Week(Today())-1)'}>}Sales)
Where Week = Week(Date)
Saludos.
Sorry I'm really amateur, could you fill in the gaps with my dates
hi,
If you have the Date, then try
=Sum( {< Date = {">=$(=WeekStart(today()-(1+num(WeekDay(today())))))<=$(=WeekEnd(today()-(1+num(WeekDay(today())))))"} >} Sales)
Hi Robert,
Sum({<DocDate={">=$(=WeekStart(Today(), -1))<=$(=WeekEnd(Today(),-1))"}>} Sales)
if(week(DocDate)=Weekstart(Today()),Sum(Sales))
and
if(week(DocDate)=Week(Today())-1,Sum(Sales))