Sum up a Range in a View

Post Reply
Memo66
Posts: 26
Joined: Thu Nov 13, 2014 8:42 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: Excel 2010

Sum up a Range in a View

Post by Memo66 »

Hi,

i am stuck with a TI Problem. Maybe you guys could help me.

I have a Cube which looks like the Excel in the Attachements.

I want to sum up the Kilometres. But what i get from my Source is the whole Distance like D to J. So i have to sum up the rows 7 to 12 so I get as a result 3900 Kilometres
The order of the Data is important so i added a Dimension (Dim2) to order the Date during the import.


It is no Problem to sum up all Kilometrs but if i have to it do it just for a specified range, there is where i am stuck.

Maybe you guys have an idea.
Attachments
Cube View.JPG
Cube View.JPG (53.48 KiB) Viewed 3072 times
Wim Gielis
MVP
Posts: 3118
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Sum up a Range in a View

Post by Wim Gielis »

Hello,

Maybe you can have a simple TI process that adds children to a consolidation in Dim 2.
First delete the children of that consolidation should the consolidation exist with children when you run the process from e.g. an Action button.
The process should contain logic to loop over Dim 2 elements, looking at measures in Dim 3 to know whether to add the child to the consolidation, or not.

Wim
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Memo66
Posts: 26
Joined: Thu Nov 13, 2014 8:42 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: Excel 2010

Re: Sum up a Range in a View

Post by Memo66 »

Hi,

thanks for your response.

Now, i have loop over DIM2 an i can sum up all the Elements. But how can i tell the TI to start in Row 7 and end in Row 12 or only put the Elements 7 to 12 under the consolidation as children.

Memo
tomok
MVP
Posts: 2832
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Sum up a Range in a View

Post by tomok »

Code: Select all

IF(!Dim2 @>= '7' & !Dim2 @<= '12');
  DoWhatever;
ENDIF;
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Memo66
Posts: 26
Joined: Thu Nov 13, 2014 8:42 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2
Excel Version: Excel 2010

Re: Sum up a Range in a View

Post by Memo66 »

Hi,

i solved the problem:

I changed my Cube. Now i have the Elem1 and Elem2 as a Dimension


I now a loop to get the ID in Dim2 and a second loop where the while only with the id i got in the first loop.

Memo
Attachments
Cube View.JPG
Cube View.JPG (44.95 KiB) Viewed 2972 times
Post Reply