COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: sandroid on 24 Sep 2015 04:03:34 AM

Title: crosstab calculate only some of the columns in the summary but show all
Post by: sandroid on 24 Sep 2015 04:03:34 AM
Cognos 10 RS. On crosstab there are weeks in columns, planned hours at measures, employees at rows, last column is automatic summary from hours. I want to see two past weeks and current and next week on the rep, but in the summary field calculate only current and next weeks hours. Now when I select the summary field and filter it using [week] >= _week_of_year(getdate()), of course on the report it only shows this and next week. So what's the hassle, how to filter only the summary field? Tried calculated field, query calculation but it gives CCL or smth error.
Title: Re: crosstab calculate only some of the columns in the summary but show all
Post by: BigChris on 24 Sep 2015 08:01:58 AM
Don't use a filter, use a calculation. Create a new field which is something like

if ( [Week] >= _week_of_year(getdate())) then ([Hours]) else (0)

and bring that in as the last column.