en
Welcome Guest! To enable all features please Login or Register.
Options
Go to last post Go to first unread
Elena Lyapina  
#1 Posted : Thursday, October 25, 2012 2:16:13 PM(UTC)
Elena Lyapina
Rank: Newbie

Groups: Administrators
Joined: 4/29/2011(UTC)
Posts: 4

Hi

I maiking a calculation where total of parents is an average of children:

if count(0, all(v,c), m2) = 0 then sum(0, 0, m2) else avg(0, all(v,c), m2)

This works perfectly as long as the hierarchy is expanded. As soon as I collapse it, the calculation of AVG on the parent goes wrong.
Do you have any advice on how to solve this problem?
Ole  
#2 Posted : Thursday, October 25, 2012 2:29:07 PM(UTC)
Ole
Rank: Administration

Groups: Administrators
Joined: 4/7/2011(UTC)
Posts: 320

I am afraid you cannot do what you want to do. The client based calculations can only work on queried data that has been pulled into the client, and when you collapse your hierarchies you no longer have client access to the lower level data. And when you no longer have access to these data, you will no longer be able to calculate the average.

I think the only way to solve this problem is to ask your Data Warehouse Developer to add the same measure to your Data Warehouse one more time, but this time using an 'Avg aggregate' function. In this way, in the client, you will have the same measure in two flacours: One using the standard 'Sum aggregate' function and one using the alternative 'Average aggregate' function.

Having these two measures in the same cross tab will allow you to create a calculation where you show averages on one level and sums on other levels.

Anyone else, please be encouraged to find other solutions to this issue as I am not sure my proposal is the only one that will work.

Edited by user Thursday, October 25, 2012 2:30:29 PM(UTC)  | Reason: Not specified

I work as an employee with TARGIT A/S. Any statement made by me in this forum represents my own opinion and state of mind, and is not necessarily related to or representative of TARGIT A/S.

UserPostedImage Ole Dyring
Users browsing this topic
Anonymous
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Notification

Icon
Error