SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


how to show data one level above the filter hierarchy


how to show data one level above the filter hierarchy

Author
Message
Raj-115466
Raj-115466
Grasshopper
Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)Grasshopper (15 reputation)

Group: General Forum Members
Points: 15 Visits: 110
Hi,

I am new to ssas and I have a specific requirement, In cube I have

Measures:
1. "% Tasks Completed" (Calculated Measure)

Dimensions:
1. Date, with (Year - Quarter - Month) hierarchy.
2. Organisation, with (Unit - Team - Employee) hierarchy.

user want slice the measure "% Tasks Completed" by date and want to filter data by "Employee" level in "Organisation" dimension, BUT....
Also at the same time want to see "% Tasks Completed" related to the "Team" employee belongs to (the level above "Employee" as you cans see in dimension 2)


how to accomplish this?
any help would be very much appreciated


Jad



VALEK
VALEK
Mr or Mrs. 500
Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)Mr or Mrs. 500 (580 reputation)

Group: General Forum Members
Points: 580 Visits: 462
It looks like you should create another calculated measure on the cube, which would go one level up (.parent) and calculate the currentmember against its parent.

What are the facts on the cube?
What soes the Task Completed % calculated measure do (code)?

M.Sc.IT, M.B.A, MCTS BI 2008, MCITP BI 2008, MCTS SQL Dev, CSM, CDVDM
denglishbi
denglishbi
Right there with Babe
Right there with Babe (775 reputation)Right there with Babe (775 reputation)Right there with Babe (775 reputation)Right there with Babe (775 reputation)Right there with Babe (775 reputation)Right there with Babe (775 reputation)Right there with Babe (775 reputation)Right there with Babe (775 reputation)

Group: General Forum Members
Points: 775 Visits: 1362
Not sure how you have this setup or what tool you are using to return these results, but if you are just querying the database you could do something like this:

SELECT Measures.[% Tasks Completed] on 0,
{Ancestor([Organisation].[Hierarchy Name].[Employee Name],[Organisation].[Hierarchy Name].[Team]),
[Organisation].[Hierarchy Name].[Employee Name]} on 1
FROM [Cube Name]

You would need to replace the hierarchy name, the employee name, and the cube name. Also, this is referencing the name of the member and not the unique name, so it might look like this with the unique member (or key) reference:

SELECT Measures.[% Tasks Completed] on 0,
{Ancestor([Organisation].[Hierarchy Name].&[Employee Number],[Organisation].[Hierarchy Name].[Team]),
[Organisation].[Hierarchy Name].&[Employee Number]} on 1
FROM [Cube Name]

By using the Ancestor function you can grab a related dimension member at a specified level in the hierarchy.

Ancestor (MDX)

----------------------------------------------------------------------------------------
Dan English - http://denglishbi.wordpress.com
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search