COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: gosoccer on 22 May 2017 02:55:52 PM

Title: Rolling Up Counts from Prev Month to the Exis Month (Relational)(Crosstab)
Post by: gosoccer on 22 May 2017 02:55:52 PM
Hi,

Pls Help!!

If someone can share their experience in Rolling Up the Previous Month's count of records to the Existing Month, I would greatly appreciate it.

I have a Crosstab and all I need to do is to include the previous counts as a part of the next month.

So,
April Record Count needs to include March count based on some condition.

Thanks in advance for your time.
Title: Re: Rolling Up Counts from Prev Month to the Exis Month (Relational)(Crosstab)
Post by: hespora on 23 May 2017 02:37:00 AM
I have no clue what it is you're trying to do. Could you whip up some dummy data to show?
Title: Re: Rolling Up Counts from Prev Month to the Exis Month (Relational)(Crosstab)
Post by: gosoccer on 23 May 2017 06:01:22 AM
My bad!  :) :) :)
Please see attached,

So, the report will show under Accumulated Count the total from previous month.
So the Accumulated Count for Nov is Starting at 18 (End of the Month) since the
previous month in Oct-16 we had 18 remaining.

Thanks for your time.  8) 8)
Title: Re: Rolling Up Counts from Prev Month to the Exis Month (Relational)(Crosstab)
Post by: hespora on 23 May 2017 06:43:00 AM
ok, for my understanding, I'm assuming the "accumulated count" value for Oct-16 is a typo and should be 16 rather than 20? because all other rows follow [accumulated count] + [new sold] = [end of month], with [end of month] carrying over as accumulated count into the next row.

If that's the case, then that's doable. Let me whip up an example.
Title: Re: Rolling Up Counts from Prev Month to the Exis Month (Relational)(Crosstab)
Post by: gosoccer on 23 May 2017 06:51:00 AM
Yes, that is correct. Thanks
Title: Re: Rolling Up Counts from Prev Month to the Exis Month (Relational)(Crosstab)
Post by: hespora on 23 May 2017 07:01:07 AM
ok, not sure if this is what you need - check the attachment.

[end of month] is simply

running-total(
  [newsold]
  for report
)

whereas [accumulated count] is

[end of month] - [newsold]


does that make sense, or did I just bypass the issue?
Title: Re: Rolling Up Counts from Prev Month to the Exis Month (Relational)(Crosstab)
Post by: gosoccer on 23 May 2017 07:08:59 AM
Very interesting. Makes sense. Ok, I'll plug it in to see how it works on my end.
Thanks so much! :)
I guess for the [end of month] - [newsold], it's a matter of creating a Data Item in the Query and Drop it in the Crosstab?