MDX Count dimension members

Very new to MDX, and stuck trying to understand how to achieve the following; would appreciate some hints in the right direction please.
Using two dimensions - Project and Department, I am trying to retrieve a count of Projects opened by each Department.
I can retrieve a total count of Projects; when it comes to breaking them out by Department, however, I'm running into problems.  My Project dimension has a Project.Department hierarchy, and I toyed with using that; my Department dimension is role-playing
(as far as I understand that term), and that is the one I am using in the sample below.
I won't go through the permutations of everything I've tried so far, but currently, as a base, I have the following:
WITH
MEMBER [Measures].[Project Count] AS COUNT({[Project].[Project].Children})
SELECT
{ [Measures].[Project Count] }
on 0,
NON EMPTY
{ [Department].[Department].Children }
on 1
FROM [MyCube]
Desired result-set would look like:
DEPT         PROJECT COUNT
Dept 1       10
Dept 2       15
Dept 3        8
My current code gives me the total count of all Projects, on every Department row, rather than a count per Department - so I'm missing something basic here.  A kickstart in the right direction would be welcomed; I've read much, but understood little!
Many thanks

Hi Cate,
Try if this works :
WITH
MEMBER [Measures].[Project Count] AS COUNT({strtomember('[Project].[Department]'+right([Department].[Department].CurrentMember.uniquename,
len([Department].[Department].CurrentMember.uniquename)-25))})
SELECT
{ [Measures].[Project Count] }
on 0,
NON EMPTY
{ [Department].[Department].Children }
on 1
FROM [MyCube]
Saurabh Kamath

Similar Messages

  • OBIEE - How to get count of members for a level?

    I have a dimension logical table and hierarchy defined in my BMM layer. I want to define a logical column that can get distinct count of members at Level0.
    Level2
    Level1
    Level0
    I tried creating a logical column using Level0 key and Count Distinct aggregation function in my dimension table. But when I use this column in the report, it gives navigation space error.
    Any ideas/thoughts on how to achieve this?
    Thanks in advance

    Aggregations always work on columns in a logical fact table and never on a logical dimension
    - Create a logical fact table based on the same physical table
    - Create a logical join between the newly created fact table and the dimension table whose levels we want to count
    - Create the Count Distinct columns, one each based on the level key columns
    - Expose the columns to the presentation
    - Deploy the rpd and it works like a charm
    Edited by: Mahesh Jayashankar on May 31, 2011 8:45 AM

  • Getting a count of members in a set

    Hello,
    I'm using Excel to connect to an OLAP cube and building a report to show actual hours charged to a project. I need to create a measure now to perform some calculation on the actual hours for which I need to get the number of days that the user is filtering
    on. The date range is added as a slicer. Is there a way to do this? I've tried 
    Count(Existing [Work Item].[System_CreatedDate].members)
    But this returns all created dates in the entire data set. I only need a count of the ones the user has filtered on. Right now it should return 66 or so since I've set it to 1/1/2014 to 3/7/2014 but I'm getting back 503 which is how many members there are
    in total in the OLAP cube not taking into account any filters I have set.
    My apologies for the basic question and the inadequate explanation of what I'm trying to get to. I have very limited experience with MDX and measures / members. I hope the question is clear enough.
    Help will be truly appreciated.
    Thanks,
    Yasir Mehmood

    Hi Yasir,
    We can define a calculated member to achieve this requirement, please refer to the following MDX code:
    CREATE MEMBER CURRENTCUBE.[Measures].[MyTestCount]
    AS (Existing [Work Item].[System_CreateDate]).Count,
    FORMAT_STRING = "0",
    VISIBLE = 1 , ASSOCIATED_MEASURE_GROUP = 'Your_Measure_Group' ;
    For more information regarding calculated member in SSAS, please see:
    Defining Calculated Members:
    http://technet.microsoft.com/en-us/library/ms166568.aspx
    If you have any feedback on our support, please click
    here.
    Regards,
    Elvis Long
    TechNet Community Support

  • How to check for a large cube (100K or more dimension members)

    Hi Experts,
    We have a customer with trouble returning large data sets.  How can I check for a large cube (100K or more dimension members) on BI7?
    Is there a tuning parameter in BW to increase the result buffer?
    Thanks!
    Sapna

    You can do a count of the n° of entries in the dimension tables.
    But that's a pain in the ***.
    You might consider running program SAP_INFOCUBE_DESIGNS.
    This program gives a list of all infocubes with a ratio between the dimensions and fact table.
    So you can see if a cube is well-designed or not.

  • How can I manage access to dimension members in a layout?

    Hello,
    I have a dimension member list of materials (400) on a "material" dimension. But some people have access to one portion of the whole group and others may have access to other groups. But the materials can be shared between groups so I cannot group them in differents hierarchies.
    The problem is in the layout you need to select a hierachy to show various rows (the whole group of materiales). The layout shows all the list of materials. Even if the user only have access to 10 of them. I don't know how is the best way for presenting this to the user? It should presents only the 10 rows corresponding to his materials.
    One way that I found (but I don't find it acceptable because of the hard effort that represents the maintenance) is to create differents member access profiles and denied the access to each material (dimension member - 390) that the user cannot modified. Then in excel I have to run a macro that hides all the rows that have an empty description in the cell of the material name.
    How can I achive this?
    Is there a function in BPC to see if a user have access or not to a dimension member?
    The only way to show in a layout various rows is to set in the view a hierarchy?
    Thanks & Regards
    SU

    hi
    pl. verify whether this will suit your requirements:
    Material           UG1           UG2
    MAT1               Y
    MAT2                                 Y
    MAT3               Y
    MAT4                                 Y
    MAT5               Y               Y
    Now UG1,UG2 diff user groups and property in Material. Assignment of Y is one time job.
    At the time of accessing the dimension members can restrict on the basis of UG1="Y" or UG2="Y" property
    Here MAT5 is common in both UG1 and UG2
    (Hardly may have 3-4 set of users: Accordingly can have UG1,UG2,UG3,UG4 etc.)
    sri

  • Using intersection of dimension members in a SINGLE column/row name

    I need help understanding how a single row/column name in a report can be populated with an intersection of two different dimension members of an Essbase cube (ASO). For example, suppose I have two dimensions members in my cube - Sales and Qtr1. Now I want to create a single column-name in my Smartview or FR report called "Sales in Qtr1" that would store values for Qtr1->Sales. Also, i want to have a single column name such as (Qtr1->Sales % Qtr2->Sales).
    Is this done via a report script or some other method?
    My report would look as follows:
    Sales in Qtr1 | Sales in Qtr2 | Qtr1 Sales as a percent of Qtr2 Sales
    Region1 100 | 200 | 50%
    Region2 25 | 100 | 25%
    Would appreciate any guidance.
    Thanks.
    Axe

    Getting the data the way you've described is really easy, just nest the dimensions in Excel (or whatever reporting tool), one dimension over the other.
    It's the same for rows as it is columns (okay, in rows instead of columns).
    Essbase is very good about doing asymmetrical reports. Take a look at the DBAG and scroll down for the section labelled "Generating Symmetric Reports" -- the second example shows a asymmetric report.
    Making the label one cell? A bit hard in Excel -- you'd have to create separate retrieve ranges and report ranges or play a game with hiding rows. Very easy indeed in Financial Reports -- you basically hide a row and put whatever custom label you want in the dimension that remains (technically speaking you could hide both rows and do this with a text row -- whatever you prefer -- but I've generally seen this with the former technique.
    Regards,
    Cameron Lackpour

  • SSRS with calculated dimension members SSAS

    Hello everybody,
    I have an interesting scenario involving a SSRS report with a matrix connected to a SSAS cube containing calculated dimension members.
    One of the parameters is "Reference Week".  Based on that parameter, I need the measures for the previous 5 weeks.
    So I created an anchor dimension "Analysis Weeks" with the members "Week -1" to "Week -5".
    Everything is working fine.  The only problem is the names of the columns on the report.  
    Currently I have "Current Week", "Week -1", etc. as column names, I'd like to show the real dates.
    For example, if I choose "2014-02-15" as the reference week, I want the first column to show "2014-02-15" instead of "Current Week". The second would show "2014-02-08" instead of "Week -1", etc.
    I tried to get the current column position in the matrix, which I could use the with @ReferenceWeek parameter, but I can't access that property.
    Any suggestion?
    Thanks

    If I understand correctly, your column group is on "Analysis Weeks", is that right? If so just get the value of that field and use it to get the dates.
    =DateAdd("d",-1*CInt(Right(Fields!AnalysisWeeks.Value,1))*7,Fields!ReferenceWeek.Value)
    "You will find a fortune, though it will not be the one you seek." -
    Blind Seer, O Brother Where Art Thou
    Please Mark posts as answers or helpful so that others may find the fortune they seek.

  • Error while transporting Dimension Members from Dev to Quality

    Hi all,
    I am having issue while I am transporting dimension members from dev to QA, The error log is as below; i am not sure what could be wrong;
    Start of the after-import method UJT_TLOGO_AFTER_IMPORT for object type(s) AAPS,AMBR ( )
    Member formula expanded for imported master data
    Start of data checker messages for Appset XXXX
    Possible Dead File/Dir:
    Possible Dead File/Dir:
    Possible Dead File/Dir:
    Possible Dead File/Dir:
    Error occurs when checking member formula use on other dimensions
    No access to environment 'XXXX'
    No access to environment 'XXXX'
    BPF: Error reading master data
    No access to environment 'XXXX'
    Errors occurred during post-handling UJT_AFTER_IMPORT for AAPS L
    UJT_AFTER_IMPORT belongs to package UJT
    The errors affect the following components:
        EPM-BPC-NW-TRA (Transport)
    please advise.
    Thanks.
    Ambika

    hi Raju,
    i tried after giving full access but again same error:-
    please see the error log below:-
    Start of the after-import method UJT_TLOGO_AFTER_IMPORT for object type(s) AAPS,AMBR ( )
    Member formula expanded for imported master data
    Start of data checker messages for Appset PETFAS
    Possible Dead File/Dir:
    Possible Dead File/Dir:
    Possible Dead File/Dir:
    Possible Dead File/Dir:
    Error occurs when checking member formula use on other dimensions
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    No access to environment 'PETFAS'
    InfoObject catalog /CPMB/PETFAS_CHAR is not available in version A
    BPF: Error reading master data
    No access to environment 'PETFAS'
    End of data checker messages for Appset PETFAS
    End of after import methode UJT_TLOGO_AFTER_IMPORT (Aktivierungsmodus) - runtime: 00:00:
    Starting after import method UJT_TLOGO_AFTER_IMPORT for object type(s) AAPS,AMBR in dele
    End of after import methode UJT_TLOGO_AFTER_IMPORT (Löschmodus) - runtime: 00:00:00
    Errors occurred during post-handling UJT_AFTER_IMPORT for AAPS L
    UJT_AFTER_IMPORT belongs to package UJT
    The errors affect the following components:
        EPM-BPC-NW-TRA (Transport)
    any suggestion..
    thanks,
    Ambika

  • Automatic creation of new dimension members

    Hello all,
    Bit of a long post so please bear with me.
    I am about to embark on only my third BPC project after having spent several years implementing solutions using BusinessObjects Planning (formerly SRC software), and am still struggling to come up with an elegant solution to the fact that I cannot save data to dimension elements unless they are already explicitly defined in the dimension member list (presumably due to cube architecture).
    Those of you who have used BOP/SRC will remember this as unvalidated dimensions.
    I find having to first go to admin and pre create members before being able to use an input schedule to save data against them is very restrictive.
    I'm hoping one of you guys can help me improve on the workaround I currently use.
    For example I have a 'bid submission' input schedule that is used by the user to submit bids for increased budget, capital or revenue, capturing basic costs and commentary. The user selects a bid number from a combo box which is populated by using an EVLST formula to read in pre created dimension members. I have to save a flag to the db which I then use to exclude already used numbers when feeding the combo box on future submissions.
    Which works ok but if I have a hierarchy on bid number based on say, cost centre, how do I get around the fact that number ranges have to be pre-assigned to cost centre, Cost Centre A = 1 to 1000, Cost Centre B = 1001 to 2000 etc. What happens if I go over the 1000 on Cost centre A? I then get non contiguous ranges per cost centre.
    Is it possible for the bid number to be dictated by the user when they start to fill in the bid submission? Or give the impression that they are?
    Or if the client has a bid number format that cannot be pre created? Eg incorporating things like year or person etc. This information could be save separately but not within the bid number. Is it possible to save data to dimension property columns from an input schedule?
    Hope you guys can help
    Many thanks
    Phil

    Philip,
    few questions.
    Which versio of BPC.
    What is your data Source
    there are few post on the below link you may find helpful
    Please list your Question in short with the tings you want.
    Re: AdminTask_MakeDim.dts
    Thanks

  • How to auto-update of script logics after adding new dimension members?

    Hi Experts,
    Just wanna ask if BPC has a functionality that would automatically update/validate and save my script logic whenever I add new dimension members. I've added new PL accounts but they are not automatically added to my calculated BS Net Income. I had to re-validate and save my logic for it to be included in my logic and for the amounts to be computed correctly.
    Thanks,
    Marvin

    Hi Marvin,
    There is no functionality as such. we need to configure the script as and when we make any changes in the dimension members.
    Regards
    Raman

  • Cannot maintain dimension members in SAP BPC

    Hello, Masters in BPC
    I have just create mention and want to input data, I used maintain dimension members CUSTOMER in SAP BPC but It seem not effect although I press Process dimension already and I open excel and paste data also saved them already. When I open other dimension and reopen CUSTOMER but nothing is shown.
    Please give me a advice to resolve the problem.
    Thanks you so much.
    Best Regards
    Chinh

    Dear Raju,
    Yes, I did it some times but nothing is happen,
    I maintain dimension members, I did it as below:
    - Choose maintain dimension members
    - copy data from excel file and paste into the dimension
    - click process dimension
    Show a dialog
    - Uncheck Take system offine
    This task is successful.
    but I go to dimension ACCOUNT in order to insert data,
    I came back maintain dimension members : CUSTOMER but I see no data is displayed.
    It is the same for ACCOUNT when I want to see data on that dimension
    when I try one more time , I click save to server, The Error message show that : Dump Error
    I reinstall BPC client and its patch but nothing to change
    How can I do???
    Thanks

  • Import Comments data and Dimension Members from csv file via Data Manager

    Dear Experts,
    I have two questions regarding the data manager.
    Q1.Is it possible to import "Comments" from the csv file via Data Manager?
    We'd like to import the amount with "Comments".
    My image of csv file is like below;
    ACCOUNT,CATEGORY,TIME,ENTITY,INPUTCURRENCY,AMOUNT,COMMENTS
    1100000,ACTUAL,2010/06,LC,30000,This is comment
    Q2.Is it possible to import the dimension "members" from the csv file via Data Manager?
    We have a user-defined dimension named "Project"
    and would like to import the members, instead of maintaining them in BPC administration manually.
    I found an online help information which says "Import Master Data from a Data File Example",
    but I could not find any relevant sample package for this.
    (I tried to import the members by using "Import" package, but it failed...)
    reference:http://help.sap.com/saphelp_bpc75/helpdata/en/86/8b1bfc12c94fb0b585cca70d6f1b61/content.htm
    Thanks in advance for your help.
    Fumi

    Hi Fumi,
    In this case, I would suggest you to create a customized SSIS package which will fill-in the "Comment<APP>" table, according to the csv file you have. I do not know any standard package that allows you to import comment the way you would like...
    Best Regards,
    Patrick

  • Changes in hierarchy dimension members causes EVDRE Errors retrieving data

    Hi everybody,
    I am facing the problem while retrieving the data in Evdre  this is the following situacion:
    1. BPC 7.5 NW SP 08 is used.
    2. Suppose that you have a template where you defined SELF,DEP for an account dimension, you expand and refresh normally, and retrieved data OK.
    3. Your business case makes that you have to move one of the dependant member of the hierarchy  to another parent
       then you go to mantain dimension member and change the parent of  the member in question, finally you process dimension,  and put available set status.
    4. Yo re-open Template or refresh dimension members from the server in order to see update hierarchy in account dimension
    5. After expanding and refreshing the evdre, shows and error "...while retrieving the data.. "
    6. I suppose the way to fix it is to reverse the change in dimension member, so I change for initial parenth but error continue.
    What do you recommend  for fix it? is there any note which solve it?

    Hi Sabine,
    Hi Sabine,
    Thanks for your answer, we followed all the steps you suggested, but the problem continue,
    Could you confirm us what is the the path of that XML file of dimension thought BW - UJFS?
    The only thing that correct problem is doing the following but not should be the best way:
    1. Supress Account dimension in application
    2. Delete dimension
    3. Recreate Dimension and process it
    4. insert dimension into application
    5. Refresh Evdre and then works fine!
    Is there any Sap note about it or something else to check?
    Thanks For your help

  • Attribute Dimension members in Planning Data form

    Hi All,
    Can we see Attribute dimension members in Planning data form ? Pls. help

    Yes it is possible in 11.1.1.3, for example in your row select a dimension that has attributes associated with it. select dimension properties next to the down drop.
    Tick "Enable custom attribute display (setting applies to all dimensions with associated attributes): "
    Select the attribute dimension
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Dimension members were not deleted after refresh in Planning desktop

    Hi
    A Planning application's outline was restored from backup.
    It contains some dimension members which were deleted from Planning Web some weeks before and there were made many Planning refreshes after. Full database refresh had been made in Planning desktop and these members were not removed. As refreshing is a procedure to keep metadata in correspondence such result isn't expected in my opinion.
    Is it normal behavior ?

    Hi
    i had a similar problem before. here is what i did
    add the member again.
    refresh
    delete the member
    refresh again.
    this solves the relational repositories sync issue.
    hope this helps.
    Dornakal.
    www.dornakal.blogspot.com

Maybe you are looking for