Hello Community,
I am really new to Cognos and I am hoping to get some help here.
What I am needing to do is sum the last 4 weeks of sales. So if I run the report today, I want a column that would show the last four weeks of sales.
Thanks!
Hi weeks is a little difficult. There are built in functions that can do this for days or months. Take a look at _add_days() or _add_months() which you can find in the list of date functions. They are designed to add days but if you put in anegative figure they will subtract days.
So you could have a filter like _add_days(sales_date,-28) 0r _add_months(sales_date,-1), that should give you sales for the last 28 days (4 weeks) or for the previous month. You can then just total the sales as normal.
Hope that helps :-)