.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

Percentage calculation across a dimension hierarchy

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :


I guess this is pretty simple for most of you but I am new to MDX and not able to implement this. I am trying to calculate percentage across the members and levels of a dimension hierarchy,[Assignee Organization Hy]. I have created a calculated member and am trying to calculate the percentage of Service Requests resolved within 72 business hrs across the members and levels of a dimension hierarchy, [Assignee Organization Hy]. I have a measure which gives the Resolution Business Hrs for each Service Request. The MDX expression I have tried is provided below :


         [Assignee Organization].[Assignee Organization Hy].currentmember.children,

         Iif([Measures].[Accumlated Resolution Business Hours]<=72,1,NULL)




        {[Measures].[Accumlated Resolution Business Hours]},

        {[Assignee Organization].[Assignee Organization Hy].currentmember.children}



where [Assignee Organization] is the dimension and [Assignee Organization Hy] is the hierarchy.

View Complete Post

More Related Resource Links

wrong Percentage calculation showing in pie chart

Hi,       Im using "#PERCENT{P2}" this one to calculate percentage in pie chart.  It should take 2 decimal only rite? But it is taking 3 decimal values. Example: 20.90678 After applying the formula "#PERCENT{P2}"  it is showing as 20.91 i want to show as 20.90 only pls help me Thanks in advance, Abdul2010

SSAS - How to get other members from dimension that has Parent Child hierarchy?

I have a Sales Territory dimension that has employee and parent employee attribute on which parent child hierarchy is defined and it gives below hierarchy while browsing - - Mark Rolls --- Lumin Jacs ----- Larry Gomes ------- Messica Owens ------- Tom Ted ----------- Jackson Lopez ----- Matthew Ron --- Fred jacob - Jason Ron --- Jecy Pedro   But beside this parent-child hierarchy I have other attributes like employee address, email and telephone. My facts related sales transaction is tagged to lowest level. For example here facts are available only for Jackson Lopez (being Field Executive). When use below query I get complete sales reporting hierarchy result with some measures like sales amount, sales volume. But while accesing other attributes like address or email, it's repeating address/email/telephone of jackson Lopes everywhere to whom fact record is linked, Actually I want address/email/telephone of each sales employee from that dimension within hierarchy. How do I get it? The query I used is: Here Parent Terr ID is parent child hierachy. SELECT ( Descendants( { [Dim SalesRegion].[Parent Terr ID].[Employee Level 01].&[538018] /* here Mark Rolls is 538018 */ }, 0,AFTER), NONEMPTY([Dim SalesRegion].[Emp Address].[Emp Address].Members), NONEMPTY([Dim SalesRegion].[Emp Email].[Emp Email].Members) ) ON ROWS , { ([Dim Date].[The Year].[The Year].[CY-2010], [Dim

Percentage Calculation in T-SQL

Hello T-SQL people,   I need help on the above subject. I have two tables, the name of the first one is Productions with 3 fields namely: agentid,amountproduced,datesold then the second table name is budget with 3 fields namely: agentid, yearbudgetamount, budgetyear, now what i want now is that i want to calculate the percentage of each agent on  amountproduced as against the yearbudget, it must be within that budgetyear. Please I need Idea.   Thanks in advance!

The 'Cost Code' dimension contains more than one hierarchy, therefore the hierarchy must be explic

I have a problem with my MDX query as i am newbie. Please help me to solve the problem, even the slightest hint would be very appreciated. I omitted some part of the query to make it more understandable. with  member [Cost Code] as case when [Equipment].[Equipment Type].&[Loader] then [Measures].[Cost Code].&[30321] else [Equipment].[Equipment Type] end select [Date].[Calendar].[All] on columns,  non empty   [Equipment].[Equipment Group].&[BGC]   *  [Equipment].[Equipment Type].children  *  [Cost Code]  *  [Equipment].[Equipment].children  *  {[Measures].[Dam Working Hours],   [Measures].[Gatsuurt Working Hours],   [Measures].[HL Working Hours],   [Measures].[Pit Working Hours],   [Measures].[Plant Working Hours],   [Measures].[Rehabilitation Working Hours],   [Measures].[Total Working Hours] }  on rows from  [Cube]

Running sum calculation based off date dimension?

I have a fairly simple calculated measure which does a running sum of a particular measure : --This does a running sum of the Net Measure up until the previous date (basically a "Starting Count" for a period. Sum(PeriodsToDate([Change Date].[Year - Month - Date].Levels(0), [Change Date].[Year - Month - Date].PrevMember), [Measures].[Net]) The problem is I have added a second hierarchy in the date dimension that includes quarter called [Year - Quarter - Month - Date]. Is there anyway around not having to create a seperate running sum calculated measure to use this new hierarchy? The PrevMember in the initial calculated measure works, although it reports the wrong number when used in conjunction with the Quarter hierarchy because it gets the PrevMember in the other hierarchy. What is the best practice for this situation?Craig

Replace pre-calculated Measures at "All" Level depending upon the Dimension Hierarchy Level

Have an interesting Challenge; thought will reach out to you if you can help Currently I am working on SSAS 2008 OLAP Cube, whereby most aggregate level measures are pre-calculated using the C# Code as part of ETL and are stored in Data Warehouse as well as Measure Groups in Cube (MOLAP). These are mostly non-additive measures have to choose this approach for performance reasons, considering the complexity of the aggregations and data volumes.  Data  Volumes are Huge (about 300+ Million Rows/ per day),  98 % of measures are non additive / semi additive.  Cube is used primarily for advance analytics and will be eventually used for data mining like time series , what if analysis and scenario analysis  Excel is used as front end . Question is how can we replace the aggregate level data for various dimensions attributes (Totals and Grand Totals) from pre-calculated measures, those are also available in the Cube as measure groups? We are currently using Scope and Root statement which is not working as expected SCOPE ([D1].[H1].[A1], M1) Root (D1) = <Get Pre-calculated value for M1 from related Measure Group for D1].[H1].[A1],  > EndScope; SCOPE ([D1].[H1].[A2], M1) Root (D1) = <Get Pre-calculated value for M1 from related Measure Group for D1].[H1].[A2] > EndScope;   Thanks in Advance   Best Regards,   Dave

MDX Calculations error - The 'Date Calculations' dimension contains more than one hierarchy, there


Hi all,

I am using http://www.obs3.com/pdf/A%20Different%20Approach%20to%20Time%20Calculations%20in%20SSAS.pdf to make a seperate dimension for the data calculations, which works in my Sales cube. But when I use the same dimension in an other cube (Called 'Procurement') and copy the MDX in the calculations tab, I am getting some errors:

Error    57    MdxScript(Procurement) (9, 8) The 'Date Calculations' dimension contains more than one hierarchy, therefore the hierarchy must be explicitly specified.        0    0   

But the 'Date Calculations' dimension does not have a hierarchy!

Now I don't know why I am getting these errors, could you guys help me out so I can understand them and fix the problem?

Thanks you in advance,


Calculation using Crossjoin throws the error "hierarchy is used more than once in the crossjoin func


My original calculation using a nested Crossjoin works & filters then aggregates records appropriately with the following rules:
- The IncidentDate is within the time period
- The latest Status is within the time period
- The [Status Count] measure is a distinct count

 AS Aggregate(
      NULL:LinkMember(Tail(existing [Status Date].[Calendar].[Day].Members).item(0),[Status Start].[Calendar]),
      LinkMember(Tail(existing [Status Date].[Calendar].[Day].Members).item(0),[Status End].[Calendar]):NULL)
    ,Generate(existing [Status Date].[Calendar].[Day],
        {(LinkMember([Status Date].[Calendar].CurrentMember,[Incident Date].[Calendar]),[Status Date].[Calendar].[All Periods])})
, [Measures].[Status Count]),

I only want the users to select data based on the [Status Date] dimension which is why I am using the LinkMember function.
I also had to use the Generate statement so that the measure works on multiselected dates.

Now I need to add in the last piece (Reported Date) to complete the rules:
- The IncidentDate is within the time

Key Columns property when creating dimension hierarchy in Analysis Services 2008


HI All

I have 3 dimensions in our Data Warehouse, dimCampaign, dimCampaignList and dimCampaignTarget
Think of dimCampaign as a marketing campaign, that contains one or more Campaign Lists (offers) for which many customers (dimCampaignTargets) receive.  The are foreign key relationships between these 3 tables, and it is the dimCampaignTarget ids that are written to associated fact tables

I have created a single dimension in Analysis Services 2008 that contains these 3 tables and their respective relationships were set up in the DSV so that I could do this.  Rather than use the 'referenced' dimension method, I wanted a 'single' dimension containing the 3 tables and their snowflake relationships in order that I can create a hierarchy that contains attributes from differing tables (namely the Campaign Description from dimCampaign, and Campaign List Description from dimCampaignList). 

My hierarchy has those 2 levels, top level is Campaign (description), and the 2nd level is Campaign List (description).  The Campaign Targets are not shown in the hierarchy, their attribute is only used in the dimension as the join to most of the fact tables.

Problem is when I set up my hierarchy, I go to change the Key Columns property of the Campaign List attribute to make it a collection of keys (Campaign and Campaign List) as I did in

Restrict SSAS dimension hierarchy to show based on role


I am having an issue that involves SSAS and Sharepoint.  I don't think I can fix the issue in Sharepoint, I think it has to be in my ssas cube.  THe issue is that in sharepoint I have a ssas filter webpart that displays the geography hierarchy based on the role that is defined in SSAS.  So if I have a user that only has permissions to Switzerland than they will see the geography hierarchy as (Region, Sub Region, Area, Country)

All Sales Region


         Eastern Europe



What I want to know is in SSAS can I restrict the hierarchy to only show country if the user belongs to a certain role.  So what I want to basically say is if the user belongs to SSAS_CH then the hierarchy should just show Switzerland, not All Sales Region > Europe, etc....

Can this be done?



Not able to drill down on a dimension with hierarchy



I created a dashboard with some dimensional hierarchy. But  on sharepoint 2010, it does not drill down automatically. I always have to right click, drill down to choose the dimension I need to drill down. But I already have the hierarchy set up in the MS SQL analysis server 2008. When I do the same on proclarity desktop professional, it seems to work perfectly fine. I can just click on the graph and it drill to the next dimension in the hierarchy and so on. But on the sharepoint 2010 dashboard, it does not seem to work.  

I am using the report of type "Anaytics Chart" report type in the Sharepoint Designer. 

Am I missing some step here? Thanks for your help and support. 






How to calculate childs age,but when i enter childs age as '03/27/2007' it returns 3 years where as actual age is 2 yr 11 months

calculation, field and map traverse adjustment, and coordinate transformation

Free Pocket PC land surveying software -- COGO calculation, field and map traverse adjustment, and coordinate transformation -- for students and professionals.

Hierarchy ID: Model Your Data Hierarchies With SQL Server 2008


Here we explain how the new hierarchyID data type in SQL Server 2008 helps solve some of the problems in modeling and querying hierarchical information.

Kent Tegels

MSDN Magazine September 2008

Excel Services: Develop A Calculation Engine For Your Apps


The Excel Services architecture lets users design their own algorithms and share workbooks on a server.

Vishwas Lele and Pyush Kumar

MSDN Magazine August 2007

Test Run: The Analytic Hierarchy Process


Most software testing takes place at a relatively low level. Testing an application's individual methods for functional correctness is one example. However, some important testing must take place at a very high level-for example, determining if a current build is significantly better overall than a previous build.

James McCaffrey

MSDN Magazine June 2005

Organization Hierarchy - Manger not showing


SharePoint 2007 SP2 on Server 2008 R2

I am doing a custom profile import using AD and a BDC connection.  All the data comes in and populates correctly, including the 'Manager' field which is being populated from the BDC entity. All main fields are being populated from the BDC entity.  Fields are; First name, last name, email, office and cell phone, and manager.

However, when viewing the Organization Hierarchy, the users 'Manager' is not showing up in the Hierarchy. Nothing above the current user is shown in the Hierarchy.  The Manager field is populated with a valid user.  If I display the Manager field in the 'Details' section, I can see the name and click on it to see their profile page as well, so it is all valid and accurate.

Colleagues ( users with the same Manager ) are listed in the Hierarchy, but none of their hierarchy's show the manager either.

I have deleted every profile and then done a full import several times with the same result. Incremental import does ont have any affect either.

Any suggestions or advice on how to get the Manager to display?

Thanks to all!


ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend