If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Week, Month to date, Year to date on one report

Started by b737, 05 Mar 2015 12:59:33 PM

Previous topic - Next topic

b737

Hi,

I have to create one report, where report is scheduled to run every Saturday, and to give back 4 columns. One column is 7 days (week back) from that Saturday, then Month to date (to Saturday) and Year to date (to that Saturday).

In example, for next Saturday which is 07.03.2015 I need to do

week to date                28.02 - 06.03.2015
month to date               01.03-06.03.2015
30 days to date            05.02-06.03.2015
year to date                  01.01.-06.03.2015

And than on next Saturday 14.03.2015

week to date                07.03 - 13.03.2015
month to date               01.03-13.03.2015
..........

How to do this on the same report for current and previous year

Thanks

charlopo

It really depends what you're trying to do with your data, but you could define some data items in your query for each time period using the _days_between() function.

For example, if you were trying to do a count of how many parts were made for each time period, you could define data items like:
COUNT(IF _days_between(current_date, [DATE]) = 7) THEN ([QTY_MADE]) ELSE null)

And similarly defining the other time periods.

Alternatively, you could create a separate query for each time period, and create a filter on your date. Then, you could use a Singleton (from the Toolbox on your report page) for each time period.

Please provide more details if I've missed the point.

b737

Thank you for fast replay.

I have report, where measure is [Sold_products] by City in rows and data items for periods. I have attached example. Also I am working in DMR