Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Gurus,
I have a Date Table with field WeekStartDate and my Fact Table with field DateOfSale. I want to compare sum of sales for this week (Week-To-Date) with sales for previous week (TOTAL Previous Week).
Kindly assist
Hello Harrison
Can you please attach an example spreadsheet please?
We may be able to do something using the weekstart, weekend, functions
Why dont you use something like this
Sum({$<Date_id = {">=$(=WeekStart(Date_id))<=$(=Date_id)"}>} [sale]) for current week till today.
Sum({$<Date_id = {">=$(=WeekStart(date(num(Date_id)-7)))<=$(=WeekEnd(date(num(Date_id)-7))))"}>} [sale]) for the entire last week.
In case you want to include the entire current week, just try using Weekend in the first statement.