Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am stuck i have to show the DAY, YTD, MTD, WTD sales and repurchases on one table with the totals. This is based on the date date that the user selects, so if the user selects a date from a year a go then the year to date would be the year prior to the date the user selected.
period | DAY | WTD | MTD | YTD |
---|---|---|---|---|
Sales | 23 | 245 | 6465 | 75654 |
Purchases | -15 | -68 | -323 | -6466 |
Total | 7 | 177 | 6142 | 69188 |
I require this to be done using qv10 but if there is a big improvement in using qv11 then i may be possible for me to use it.
Thanks
Set statement like this.
YTD:
Sum({<Date={'>=$(=(Num(YearStart(Max(Date)))))<=$(=(Num(Date)))'}>}Amount)
MTD:
Sum({<Date={'>=$(=(Num(MonthStart(Max(Date)))))<=$(=(Num(Date)))'}>}Amount)
WTD:
Sum({<Date={'>=$(=(Num(WeekStart(Max(Date)))))<=$(=(Num(Date)))'}>}Amount)