COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Shailaja0520 on 16 Feb 2009 12:53:23 AM

Title: how to show weekly and monthly data ina same list report
Post by: Shailaja0520 on 16 Feb 2009 12:53:23 AM
i want to show total weekly data(7 days) and monthly data(30 days) in a one list report.

data is shown by the count of one column.

is there any way to apply filter for the same data item which will be showing monthly in one column and weekly in the other column.
or is there any way to write expression to write in both the columns.
Title: Re: how to show weekly and monthly data ina same list report
Post by: blom0344 on 16 Feb 2009 04:00:09 AM
You cannot perform this action by applying a filter. You need to use CASE expressions that will return the value for a given daterange (month,week) or else 0:

CASE WHEN
EXTRACT(MONTH,[somedate]) = ................
THEN ([some_measure])
ELSE (0)
END

And use this expression on a specific data-item..