COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: philelmousse on 20 Dec 2011 02:17:10 AM

Title: issue to aggregate data item
Post by: philelmousse on 20 Dec 2011 02:17:10 AM
Hello,

I have a data item built like this :

#prompt('p_Time','token','[REPORTING LAYER].[Time].[Time]')#

I'm not able to aggregate it so when i run the report my time dimension returns something like that for the days :

1 1 1 1 2 2 2 3 3 3 4 4 4

It represents the number of the day of month but I would like to aggregate it.

Title: Re: issue to aggregate data item
Post by: blom0344 on 20 Dec 2011 04:27:37 AM
Aggregate into what?  Aggregating daynumbers ?  Please explain what you need..
Title: Re: issue to aggregate data item
Post by: philelmousse on 20 Dec 2011 04:31:21 AM
yes exactly, aggregating the levels of time dimension.

if I select 'Total' for aggregate function it returns that error :

The 'within detail' or 'within aggregate' clause in the dataItem 'dataItem="Total(TimeDimension)"' refers to measure 'dataItem="TimeDimension"'. Aggregation over measure sets is not supported.
Title: Re: issue to aggregate data item
Post by: blom0344 on 20 Dec 2011 05:00:35 AM
That does not clarify things. What is your goal?  Do you want to count how many daynumbers exist for a given month.  Explain where you are after
Title: Re: issue to aggregate data item
Post by: philelmousse on 20 Dec 2011 05:19:39 AM
i would like to aggregate the measure of my crosstab depending on the time dimension level

now i get :

              Dim col (tim)
              1 1 1 1 2 2 2 3 3 3 (day number of the month)
Dim row measures

I would like something like that :

              Dim col (tim)
              1 2 3 4 5 6 7 8 9 10 11... (day number of the month)
Dim row measures

Title: Re: issue to aggregate data item
Post by: MFGF on 20 Dec 2011 05:42:30 AM
So you want to group the days, not aggregate them? Is this a dimensional or a relational package? My guess is that it's dimensional, and each day has a different MUN, so is not being grouped, but I'm famous for being wrong! :)

Can you give us a little more detail?

Regards,

MF.
Title: Re: issue to aggregate data item
Post by: philelmousse on 20 Dec 2011 06:03:52 AM
yes exactly, its a DMR.

My day level is : extract(day,[LOGICAL LAYER].[Fact].[HDATE]) so it should be unique no ?
Title: Re: issue to aggregate data item
Post by: philelmousse on 20 Dec 2011 06:19:47 AM
ok i see the problem... but do you know a workaround ?
Title: Re: issue to aggregate data item
Post by: MFGF on 20 Dec 2011 06:37:53 AM
Nope. While the caption for each day member might appear to be unique, the underlying MUNs for each day will be different. You can see this if you expand the member tree in the package on the left and right-click on a couple of the day members and select 'properties' - the MUNs will be different. Within your hierarchy, each day member belongs to a different month of a different year, and this relationship is preserved via the member unique name.

You could try extracting the caption for use in your columns:

caption([Your day level])

or if this doesn't work, you could try fudging it with a substring function:

substring(caption([Your day level]),1,2)

Cheers!

MF.
Title: Re: issue to aggregate data item
Post by: philelmousse on 20 Dec 2011 06:47:30 AM
My data item is built like this :

#prompt('p_Time','token','[REPORTING LAYER].[Time].[Time]')#

Can I use what you gave me with that ?
Title: Re: issue to aggregate data item
Post by: MFGF on 20 Dec 2011 08:19:37 AM
Can you explain what you are trying to do and why your item is coded that way?

MF.