Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am currently using a variable field to compare sales for a day.
Sum({< Inv_Date = {'$(=vDateCompare1)'}>}
How would I be able to change that value so that it includes for the full week.
All invoices from vDateCompare1 field up to vDateCompare1 + 6
Thanks
If I fully understand; let's assume your variable is vToday=today() (or another date)
if it's today: 24/02/2017
you want to compare all the week or from the start of the week to today?
from 20/02/2017 to 24/02/2017?
If that's the case:
you can use 2 expressions:
actual week to date:sum( {< date={">= $(=WeekStart( $(vtoday) )) <= $(vtoday)"} >} sales)
previous week to date: sum( {< date={">= $(=WeekStart( $(vtoday) -7) )<= $(vtoday)-7"} >} sales)
if you want to perform comparison for the whole week:
actual week :sum( {< date={">= $(=WeekStart( $(vtoday) ) )<= $(=WeekEnd( $(vtoday) ))"} >} sales)
previous week : sum( {< date={">= $(=WeekStart( $(vtoday) -7) )<= $(=WeekEnd( $(vtoday) -7))"} >} sales)
Hope this will be helpfull,