Page 1 of 1

Sum up a Range in a View

Posted: Fri Nov 27, 2015 9:30 am
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.

Re: Sum up a Range in a View

Posted: Fri Nov 27, 2015 10:31 am
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

Re: Sum up a Range in a View

Posted: Fri Nov 27, 2015 11:05 am
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

Re: Sum up a Range in a View

Posted: Fri Nov 27, 2015 12:20 pm
by tomok

Code: Select all

IF(!Dim2 @>= '7' & !Dim2 @<= '12');
  DoWhatever;
ENDIF;

Re: Sum up a Range in a View

Posted: Mon Nov 30, 2015 9:38 am
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