COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: charon on 19 Oct 2012 06:29:06 AM

Title: Filter for Columns?
Post by: charon on 19 Oct 2012 06:29:06 AM
Hi Everybody,

its me, maaaario.  ???
However, i have another question considering Report Studio.

I am using a crosstab, the report has 2 prompts for year and month (nr). These parameter filter my query for the crosstab like ([year] = ?year? as filter 1, filter 2 is like [month] <= ?month?)
The idea is to get a YTD generation for some facts (i need the ytd based on a dynamic choosen parameter, also tm1 is integrated in this for a soloution to write back comments, but thats another topic ;..just saying, thats why i implemented this kind of YTD-logic)

The challenge: i found out that some numbers are not the "deltas" for each month, means e.g. sold items for january, february, march..and so on,
but aggregated ytd like (sold items for january, sold items for yanuary + february)

This bites my logic for YTD as you can imagine....how can i solve this without creating a whole new report?
I was thinking if it was possible to use a filter just for coliumns, i could define a filter like (if [month] = ?month? then [solditems] else 0) so he filters me all data bevor the choosen month.

another idea but similar to this approach would be to create a new data item and use if or case logic like
case [month]
when [month] = ?month? then [solditems]
else 0
end

But this didnt work as well..
any ideas would be awesome.
Cheerz :P
Title: Re: Filter for Columns?
Post by: Bark on 13 Nov 2012 11:14:50 AM
If I understand it correcty, the months you display are already the running-YTD (so to speak). Why don't you change the aggregation to MAX? as if it is incremental, the max will be the real total.

if it comes from a cube or DMR, you can also try aggregate([solditems] within set closingPeriod(Level)).

Hope it helps.

Regards,

Bark