MDX query to retrieve Leaves sorted by attribute bypassing the parent order

Hi there,
I have a Dimension with a hierarchy as:
Country -> Area -> Location
Location is sorted based on a Attribute called Rank based on a column in the dimension table that has a predefined value per location. In short, Location attribute has the property OrderByAttribute set to Rank.
When I used Location attribute directly on the reports it is correctly displayed sorted by Rank.
I am building some dashboards in Performance Point, and the problem I have is that I have to used the Hierarchy above to pull the Locations into the row axis of a Scorecard and the Locations are shorted by Rank but taking into account the Area in which they
are:
So using the Hierarchy I am getting:
Location1
Location2
Location3
Location4
When I would like to get:
Location3
Location1
Location4
Location2
I know that this is correct when thinking on the Hierachy structure, but as I am forced to display the Locations from the Hierarchy but sorted purely by their Rank, I would need a MDX query that returns the Leaves (Location) of the hierarchy order by Rank
without taking into account the area.
Could anyone help me with that?
Thanks and best regards,
Joss

You could write a query something like this:
SELECT {MEASURES.MYMEASURE} ON 0,
ORDER([MYDIMENSION].[MYHIERARCHY].[LOCATION].MEMBERS, [MYDIMENSION].[MYHIERARCHY].CURRENTMEMBER.PROPERTIES("Rank", TYPED), BDESC) ON 1
FROM MYCUBE
Regards,
Chris
Check out my MS BI blog I also do
SSAS, PowerPivot, MDX and DAX consultancy
and run public SQL Server and BI training courses in the UK

Similar Messages

  • Why character is sorted before number in the ascending order?

    By specify sorting by as ascending, the result will be
    aaa
    bbb
    111
    222
    By specify sorting by as descending, the result will be
    222
    111
    bbb
    aaa
    and the expected result(ascending), which is the one normally adopted by sql is
    111
    222
    aaa
    bbb
    any idea to achieve this?

    Try This:
    <?sort:SiteName;lang='no'?>
    or
    <?sort:string-length(substring-before ('01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
    ,substring(SiteName,1,1))) ;'ascending';data-type='number'?>
    or
    <?sort:string-length(substring-before ('01234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
    ,substring(SiteName,1,1))) ;'descending';data-type='number'?>

  • MDX Query-How To ignore all measure calculations where the measure is zero

    Hi,
    I have a query MDX that also extracts the values of 2 measure with value 0. 
    How can I do ignore and not to extract ? 
    Example:
    Customer________Quantity________Revenue
           1____________0_______________0
            2____________1______________10
           3_____________2______________15
    I want extrcat only:
    Customer________Quantity________Revenue
           2____________1______________10
           3_____________2______________15
    thanks.

    Hi,
    I too have the same issue. It would be great if you can update how you resolved it.
    Thnaks for your answer.
    Saravanan Payani.

  • How to union results from 3 different dimensions in where clause with or - Mdx query

    Hi 
    I have a MDX Query and i need to pass the variable values to it by dynamically.
    Each time it will get any one attribute from three dimensions.
    Select 
    {} ON Columns,
    {} ON Rows 
    From
    Cube
    Where
    [Dimension1].[Attribut].&[Value]
    or
    [Dimension2].[Attribut2].&[Value]
    or
    [Dimension3].[Attribut3].&[Value]
    So It is working for two different values by using union and cross join.
    Can you please provide the solution ..
    Thanks in advance

    Hi Philip
    Thanks for replying me.
    I tried on that way, In my mdx query i am using one slice attribute (i.e [Customer].[Gender].allmembers) in rows so getting error "The  Hierarchy already appears in Axis1".
    SELECT
    {[Measures].[Internet Sales Amount] } ON 0,
    NON EMPTY
    {[Customer].[Gender].allmembers } ON 1 -- Used
    FROM
    [Adventure Works]
    WHERE
    [Customer].[Gender].&[M]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].&[XL]
    ,[Customer].[Country].[All Customers]
    [Customer].[Gender].[All Customers]
    ,[Product].[Size Range].[(All)]
    ,[Customer].[Country].&[Australia]
    Can you provide alternate ways to get resolved.
    Thanks in advance

  • Is it possible to build hierarchy (among 4-5 std. dim) in MDX query?

    Hi,
    Let's say i have 4 standard dimensions:
    Std1
    Std2
    Std3
    Std4
    Each of the above standard dimensions have their own hierarchy.
    Std1
    ==Std1_1
    ==Std1_1_1
    Std2
    ==Std2_1
    Std3
    ==Std_3_1
    Std4
    ==Std4_1
    Now, we can see that there is "NO" hierarchical relationship between any two of the above four standard dimensions.
    I would like to build a hierarchy(dynamically) in the MDX query (during retrieval), so that, the standard dimensions and the measures are retrieved in my required hierarchy.
    For example, if at runtime, i want hierarchy like the below:
    Std2
    |_ Std3
    |_Std1
    |_Std4
    Can i build this hierarchy in MDX query?
    Is there any way to do this in MDX?
    Thanks in advance.
    Regards,
    Vivek Ganesan

    What you want is a custom data formatter. I would give you some links, but my iPad wants to convert them into the documentation viewer.
    You aren't going to find much help with C++ debugging. While Apple's Clang has made great improvements in C++ support compared to GCC, C++ is really not something that Mac or iOS programmers typically use. The Cocoa containers and objects are so much more versatile. You kind of have to have a masochist streak and a 7 year development schedule to use C++. C++ is experiencing a bit of a resurgence, especially in defense markets. For a long time, compilers had such poor support for C++ that it just wasn't possible. After simplifying the language a little, compilers can now compile and link C++. Consultants have realized they can provide C++ services and burn though billable hours better than any other language on the market. Independent developer, however, don't have those schedules and budgets so they tend to use NSArray. Xcode supports it better in the debugg and, chances are, you don't need to debug it anyway. There are a number of matrix classes built on Cocoa.

  • SAP BW BEx query - WEBi MDX query

    Hi Experts, have we had some discussion on this?
    Does MDX query send by WEBi report to BW use the same program to extract data from BW database?
    One of the option for WEBi report source of data is to build Universe on top of BEx query. Could you share how this process actually happen.
    I think
    - WEBi query will pass parameters that is relevant for BEx query filter of the universe
    - the BEx query will then extract the data (following normal process if we run BEx query independently)
    - if WEBi has further filtering, it will then get the BEx result above and filter it further ..??
    So, how is MDX query come into the picture?
    Or is it:
    - WEBi query and the BEx query will determine what MDX query will be generated, and this MDX query will then fetch the data.
    But why BEx query extract data faster then MDX query?
    Sorry, i am new to this. hope someone could share some light here. In the meantime i continue to real those documentation and try to get some more ideas of what is actually happening.
    Thanks.

    Hi Thanks a lot for pointing this out.
    Did i understand it correctly that BEx query is using a different set of program (platform) to retrieve data compare to MDX query, and not MDX uses those program that is used by BEx to retrieve data from BW database and have extra steps on top of that?
    Can anyone share what is actually happen WEBi MDX query is executed (how the database is hit with SQL, and what are the tools to evaluate the efficiency of the WEBi (or the used BEx). As for BEx we have RSRT to analyze it right.
    And even to test the MDX query using MDXTEST and try to get the data from WEBi report, i found WEBi report still take considerably a lot longer. Why is this so? just because BO is a different system then BW?
    And as it's shared the BO 4.0 is using the same platform as BEx to retrieve data from BW database, does this mean we don't need to care about MDX usage in BW anymore as far as BO data extraction concern?
    Thank you very much.

  • MDX Query Desinger Slow to Respond on a WAN

    We are seeing the MDX Designer take a long time to open and to select filters.  Running a Query is fast, but selecting filters from dimension members that only have 2 to 10 members can take up to a minute to display and the same is true when dragging
    the member into the Filter pane.  Executing the query is not an issue and the returned results even 1000's of rows is fairly quick. 
    raym

    Hi rayishome,
    According to your description, when you using multiple parameters in Filter in MDX Query Designer, it takes long time to execute the query. Right?
    In this scenario, I want to know the version of SSRS you are using. It has reported similar issue in SSRS 2008, and this issue has been released in both SQL 2008 SP1 and SQL 2008 R2. Please refer to link below:
    SSRS BIDS Query Designer very slow when using multiple parameters
    Also please refer to a blog below:
    Speeding up the Query Parameters Dialog in the SSRS Query Designer
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Abap- XML: sorting of attributes

    Hi,
    I would like to create an XML-File from ABAP.
    This still works fine.
    There's only one problem: the sorting of the output-XML-file is not like the sorting at the XSLT.
    Here's the part of the coding of the transformation:
    <xsl:element name="PERSON">
             <xsl:attribute name="Personennr"><xsl:value-of select="PARTNR_--40ADRNR" /></xsl:attribute>
             <xsl:attribute name="PersArtCd"><xsl:value-of select="PARTTYPE" /></xsl:attribute>
             <xsl:attribute name="LandesCd"><xsl:value-of select="COUNTRY" /></xsl:attribute>
             <xsl:attribute name="PLZ"><xsl:value-of select="POSTCODE" /></xsl:attribute>
             <xsl:attribute name="Ort"><xsl:value-of select="CITY" /></xsl:attribute>
             <xsl:attribute name="Strasse"><xsl:value-of select="STREET_NO" /></xsl:attribute>
    The output looks like this:
    <PERSON LandesCd="A" Ort="WIEN" PLZ="1010" PersArtCd="X" Personennr="000123456" Strasse="STREET. 1">
    I want to have the field "Personennr" at first position and the sorting as in the XSLT respectively.
    Any ideas??
    Best regards,
    Wolfgang

    Hi Wolfgang,
    I receive attributes in the listed order, unsorted, only with crazy tricks...
    <i><u>Either using names with leading spaces:</u></i><pre>
        <xsl:attribute name="     Personennr"><xsl:value-of select="PARTNR_--40ADRNR" /></xsl:attribute>
        <xsl:attribute name="    PersArtCd"><xsl:value-of select="PARTTYPE" /></xsl:attribute>
        <xsl:attribute name="   LandesCd"><xsl:value-of select="COUNTRY" /></xsl:attribute>
        <xsl:attribute name="  PLZ"><xsl:value-of select="POSTCODE" /></xsl:attribute>
        <xsl:attribute name=" Ort"><xsl:value-of select="CITY" /></xsl:attribute>
        <xsl:attribute name="Strasse"><xsl:value-of select="STREET_NO" /></xsl:attribute> </pre>
    <u><i>or using different namespaces for each attribute:</i></u><pre>
        <xsl:attribute name="Personennr" namespace="1"><xsl:value-of select="PARTNR_--40ADRNR" /></xsl:attribute>
        <xsl:attribute name="PersArtCd" namespace="2"><xsl:value-of select="PARTTYPE" /></xsl:attribute>
        <xsl:attribute name="LandesCd" namespace="3"><xsl:value-of select="COUNTRY" /></xsl:attribute>
        <xsl:attribute name="PLZ" namespace="4"><xsl:value-of select="POSTCODE" /></xsl:attribute>
        <xsl:attribute name="Ort" namespace="5"><xsl:value-of select="CITY" /></xsl:attribute>
        <xsl:attribute name="Strasse" namespace="6"><xsl:value-of select="STREET_NO" /></xsl:attribute> </pre>
    Of course, it contradicts the W3C standards and common sense and the first trick doesn't work with IE or other XSLT processors, except SAP's XSLT_TOOL and CALL TRANSFORMATION...
    Best regards,
    Vlad

  • Adding View Criteria Row attribute in a particular order

    Hello friends,
    We are using the Jdeveloper version 11.1.2.3.0.
    We are populating the Query component filter programmatically , we want to show the filter order in a particular way.
    The following is the code.
    ViewCriteriaManager vm = view.getViewCriteriaManager();
    oracle.jbo.ViewCriteria vca[] = vm.getAllViewCriterias();
    oracle.jbo.ViewCriteria vc = vca[0];
    vc.removeAllElements();
    ViewCriteriaRow vcr = vc.createViewCriteriaRow();
    vcr.setAttribute("A", "");
    vcr.setAttribute("B", "");
    vcr.setAttribute("C", "");
    vcr.setAttribute("D", "");
    vc.add(vcr);
    vc.saveState();
    view.applyViewCriteria(vc, true);
    vm.criteriaChanged(vc);
    But the filter is shown in the Query component in the following order.
    C,A,B,D
    Is there any way to add a filter in particular order?
    Thanks in advance.
    Best Regards,
    Vijay

    Sounds like your users are tough. You can provide your own ViewCriteriaAttributeHintsImpl and override the behaviour of HINT_NAME_FIELD_ORDER.
    Create a custom ViewRowAttrHintsImpl class
    public class CustomViewRowAttrHintsImpl extends ViewRowAttrHintsImpl {
    @Override
    public String getHint(LocaleContext locale, String sHintName) {
      if (HINT_NAME_FIELD_ORDER.equals(sHintName)) {
        //calculate and return field order here
      return super.getHint(locale, sHintName);
    }Generate a ViewRowImpl and return your custom class in createViewRowAttrHints
    @Override
    protected ViewRowAttrHintsImpl createViewRowAttrHints(AttributeDefImpl attrDef) {
    return new CustomViewRowAttrHintsImpl(attrDef, this);
    }

  • Sort a playlist in a special order

    Hello,
    is ther a way to sort a playlist in the following order:
    First: Artist (ascending)
    Second: Title (ascending)
    Third: Duration (Decending)
    How can i achive that ?
    Thanks Matthias

    If only we had access to the SQL engine hiding inside iTunes it would be easy. However sorting 30,000 songs with vbScript would be painfully slow. If you can narrow things down so that you are working with say a few album artists at a time it might be practical. Looking at the iTunes COM SDK I can't seem to find a way to affect the *Play Order* of an existing playlist, however adding tracks to a new playlist in the order that you want should be possible. The script would need to gather the indexes of the selected tracks and the other properties you need for sorting into some kind of array, sort this array, and then construct the new playlist by adding the tracks in the given order. If you are in to writing scripts then you might want to look at my scripts page in case anything there gives you inspiration, otherwise I'll try to have a go at putting something together. SortDateAdded contains a sort method and Unconsolidated has a playlist building routine. It should be possible to automatically "uncheck" all but the longest track with each track name. You could then review the list in case you want to change things.
    tt2

  • Sorting query in MDX query filter in PPS

    Hi,
    Iam new to the PPS world. Iam using MDX query filter and I need to create a filter field using the [BusinessLine].[Department] dimension. I need to sort the display value of Department in descending order in the filter and Iam using the following
    Order([BusinessLine].[Department],[BusinessLine].[Department],DESC) in the query window while creating the filter. But Iam getting 'No value found'! result.
    Please let me know Iam doing any mistake in this

    Hi Umair,
    Thanks for the reply
    The department here is Attribute and BusinessLine is dimension in my cube.For other requirement(the department has to be sorted based on the creation date attribute) purpose I have kept department as composite key with other attribute called CREATE_DATE
    with named column as department
    Order (
    [BuisnessLine].[Department].[DEPARTMENT],
    [BusinessLine].[CREATE_DATE].Properties("Name"),
    DESC
    Iam just replacing the above query as it is in the Enter MDX formul? page
    Is it correct.

  • Filter and Sort Transient Attribute from Query Panel

    Jdev 11.1.1.3
    Hello,
    i am not able to filter a transient attribute from the standard query panel (with result table).
    I did following things:
    -Call an Initial AppMod Service Method from my Bounded Task Flow, and fill the Transient Attribute with some values (with setter method)
    -Next, call the Page with following characteristics:
    I defined a custom View Criteria with particular Bind Variables, take as query execution mode = In Memory and activate the Auto Query Flag
    Drag and Droped this Criteria from Conroll Panel on the Page as Query Panel with Table
    In Page Data Binding Definition, i set the InitialQueryOverridden Flag to true, otherwise no data will be filled in the transient attribute
    The sort and filter works only for the Database Attributes.
    Has anyone an Idea, how to keep same behavior for the trans attr.?
    Thank You!
    (Note: When i set the Query Mode (after init Call) to vo.setQueryMode(ViewObject.QUERY_MODE_SCAN_VIEW_ROWS), then the sorting of Trans Attr is working fine.
    But the filtering is not working well: Lets say a filtering is done by the Trans Attribute and we get 3 Rows. But when all rows wanted to be retrieved again, only those 3 are available then, no chance to get all rows back)

    Hi,
    assuming that sorting and filtering are similar, have a look here
    sorting on transient attribute
    Frank

  • Filter issue in MDX query leaving some values empty!

    Hi all,
    In short: I have a report with multiple values such as name of shop, postal code etc. The parameters have no default value and act as "like". If someone enters "krant" he'll get all the shop names that contain "krant" in their
    name etc. 
    Same goes for postal code, if someone enters 2550 he'll get all data for 2550. The problem although is that if a user start with postal code as parameters and leaves the shop name empty, the shop name is not shown in my report! The other way around it works,
    when I enter shop name i'll get all shops + postal code in my report.
    I know this is because POS name cannot be shown in report because it's left blank, but I want my MDX query to be able to give me the POS names even if I only enter postal code.
    Can someone please please look at my query below? I need to add 4 more parameters this way later on too!
    SELECT 
    [Measures].[Sales amount]
     ON COLUMNS, NON EMPTY
    Filter(
                                   [Point of sale].[POS name].AllMembers,
                                   InStr(
                                                   [Point of sale].[POS name].CurrentMember.MEMBER_CAPTION,
                                                   @PAR_POSName
                                   ) > 0
    *Filter(
                                   [Point of sale].[POS postal code].AllMembers,
                                   InStr(
                                                   [Point of sale].[POS postal code].CurrentMember.MEMBER_CAPTION,
                                                  @PAR_POSTAL_CODE
                                   ) > 0
    *[Point of sale].[Client id].[Client id]
    *[Point of sale].[POS id].[POS id]
    *[Point of sale].[POS street].[POS street]
    *[Point of sale].[POS town].[POS town]
    *[Point of sale].[POS housenumber].[POS housenumber]
    ON ROWS
    FROM [mycube]

    Hi Yvanlathem,
    Have you create the parameters in the MDX Query Designer? I haved tested it on my local environment (Microsoft SQL Server 2012 (SP1) - 11.0.3401.0 (X64) Enterprise Edition (64-bit)), we cannot reproduce this issue.
    with
    set subset1
    as
    filter ([Geography].[Geography].[Country].members,
    instr([Geography].[Geography].currentmember.name,@name)>0
    select {} on 0,
    subset1 on 1
    from
    [Adventure Works]
    Reference
    Define Parameters in the MDX Query Designer for Analysis Services (Report Builder and SSRS)
    Regards,
    Charlie Liao
    TechNet Community Support

  • MDX : How to use filter on a dimension without showing it OR merge 2 attributes of the same dimension?

    Hello everyone,
    I'm kind of newbie with MDX language, I'm trying to get filtered measures from a cube with a specific layout.
    Here is my exemple :
    I want to get all the "order numbers" where the "invoice" cost is more than 300.  Each invoice is linked with an ID, one order number can have several invoices.
    So what I do is a select request with 2 dimensions : "order num" and "id_invoice"
    Here is the result : I get all the cost sorted by "order num" and I can easealy identify those who are above 300
    order num
    Id_invoice
    cost
    Total
    Total2
    15450307
    10032013094498
    1671
    1737
    ok
    15450307
    10032013099835
    66
    1737
    KO
    15450596
    10032013094078
    8524
    8524
    ok
    15451214
    10032013094119
    228
    4348
    KO
    15451214
    10032013097069
    978
    4348
    ok
    15451214
    10032013097071
    3142
    4348
    ok
    15542434
    10032013101736
    142
    142
    KO
    15550064
    10032013097016
    1261
    1261
    ok
    15550346
    10032013097586
    2252
    2252
    ok
    15550353
    10032013098446
    2617
    2617
    ok
    What i need : In "cost", I need to have the sum of each cost which are above 300 in one line (without showing the invoice id)
    order num
    cost
    Total
    Total2
    15450307
    1671
    1737
    ok
    15450596
    8524
    8524
    ok
    15451214
    4120
    4348
    ok
    15550064
    1261
    1261
    ok
    15550346
    2252
    2252
    ok
    15550353
    2617
    2617
    ok
    How is it possible to use a filter on a dimension without showing it or merge 2 attributes of the same dimension ?
    The problem is that if I show "id" column, the filter doesn't work properly : it compares 300 with the total cost of the whole order and does not compare with each invoice (which could be under 300 ! - see "KO" in Total2 column)
    Here is the request I use to generate this result :
    with
    member [Measures].[Total]
    as (
    [TP].[ID INVOICE].[All],
    [TP].[ORDER NUM].currentmember,
    [Measures].[COST]
    member [Measures].[Total2]
    as (
    IIF([Measures].[COST] >
    300, "ok",
    "KO")
    select
    {[Measures].[COST],[Measures].[Total],[Measures].[Total2]}
    on
    columns,           
    Filter
                 [TP].[ORDER NUM].[ORDER
    NUM].members *
                 [TP].[ID INVOICE].[ID
    INVOICE].members
                 ,[Measures].[COST]
    > 0
    on
    rows
    FROM [MYCUBE]
    Thank you  for your help !
    Kind regards,
    Olivier.

    Hi Olivier,
    hereunder a similar query against the AW. For all order numbers, we sum all lines above 30 without diplaying the line numbers:
    WITH
    MEMBER [Measures].[lines above 30] AS
    IIF(
    [Measures].[Internet Sales Amount] > 30,
    [Measures].[Internet Sales Amount],
    null
    MEMBER [Measures].[aggr lines above 30] AS
    SUM(
    exists(
    [Internet Sales Order Details].[Sales Order Line].[Sales Order Line],
    [Internet Sales Order Details].[Sales Order Number].currentmember
    [Measures].[lines above 30]
    SELECT
    [Measures].[Internet Sales Amount],
    [Measures].[aggr lines above 30]
    } ON 0,
    [Internet Sales Order Details].[Sales Order Number].[Sales Order Number] ON 1
    FROM ( SELECT
    [Product].[Category].[All Products] ON 0,
    [Internet Sales Order Details].[Sales Order Number].&[SO51177]:
    [Internet Sales Order Details].[Sales Order Number].&[SO51178]
    } ON 1
    FROM [Adventure Works] )
    I reduced the cube with a subselect.
    Philip,

  • MDX Query using BottomCount to limit Median calculation returns null

    I'm building a new cube that includes some person age values that aren't useful when summed, but are
    useful when the median is determined. The measure group that contains the measure for the age has a 1-1 relationship with a dimension in the cube because both use the same table as the source. This is important because I use the key attribute of the dimension
    as the set expression in the Median function to prevent any summation before the median is found. Here is the code for the original median calculation:
    MEMBER Measures.[Median Age] AS
    MEDIAN(
    [Placement Dimension].[Id Removal Episode Fact].Members,
    [Measures].[Age At Removal Months]
    This median naturally represents the half-way point in the series of values. My analysts have also requested
    median-type values at the quarter and three-quarter points in the same series. I've been able to accomplish this for the three-quarter point by nesting the TopCount function in the set expression of the Median function to limit the set to the last half of
    the records and then find the median point like this:
    MEMBER Measures.[75th Percentile] AS
    MEDIAN(
    TOPCOUNT(
    [Placement Dimension].[Id Removal Episode Fact].MEMBERS
    ,Measures.[Episode Count] / 2
    ,Measures.[Age At Removal Months]
    ,Measures.[Age At Removal Months]
    However, my attempt to use the BottomCount function in the same way as TopCount to find the quarter point
    in the whole data set by limiting the calculation's set to the first half of the data always returns null. Here is how I've formed the code:
    MEMBER Measures.[25th Percentile] AS
    MEDIAN(
    BOTTOMCOUNT(
    [Placement Dimension].[Id Removal Episode Fact].MEMBERS
    ,Measures.[Episode Count] / 2
    ,Measures.[Age At Removal Months]
    ,Measures.[Age At Removal Months]
    And here is the query that returns the values:
    SELECT
    Measures.[Episode Count]
    ,Measures.[Median Age]
    ,Measures.[25th Percentile]
    ,Measures.[75th Percentile]
    } ON 0
    ,[Date Begin].[Calendar Hierarchy].Year.&[2011]:[Date Begin].[Calendar Hierarchy].Year.&[2014] ON 1
    FROM [POC Cube]
    WHERE
    [Age at Removal Mos].[Age in Years List].[Age Year].&[0]:[Age at Removal Mos].[Age in Years List].[Age Year].&[5]
    I don't know why the end result is always null. I don't have any null values in the data for this measure, and I know what values I should be seeing because I've found the median records manually in results from a SQL Server query. I've tried using TopCount
    and multiplying Measures.[Age At Removal Months] in the TopCount function by -1 to workaround the descending sort, but I still get nulls. I've also tried separating these queries out so the quarter point and three-quarter point calculations aren't run together,
    but I still get nulls for the quarter point calculation.
    I'm open to any help fixing this situation by modifying my current code or by using alternate methods, but the end result has to be dynamic enough to be used as a calculation in the cube. Thanks!

    The links might helps.
    http://technet.microsoft.com/en-us/library/ms144864.aspx
    http://www.mssqltips.com/sqlservertip/3034/sql-server-analysis-services-ssas-2012-top-and-bottom-functions/
    http://www.sqlservercentral.com/blogs/bradleyschacht/2012/03/12/mdx-functions-bottomcount/

Maybe you are looking for

  • IPhoto 4 - Can't see pictures to organize them

    I just ordered iLife '08. In the meantime, I am using iPhoto 4. Things have been running smoothly for years. Today, that changed. For some reason when I am working with my photos in the "organize" setting I can no longer see all the pictures in any p

  • Download and Upload Modulepool program

    hai all,    Could any one say how to Download and Upload Modulepool program from sap. Thanks, Jeevan.

  • Replacement iPhone has someone else's details in

    Just had my phone replaced by the apple store. If its a refurbished one why does it have a previous owners email addresses and iTunes account in it? Has this happened to anyone else. Thanks

  • Guaranteed Crash – Adding page via Pages panel

    Hiya, When I try to add a page to my document or organise existing pages – via the Pages panel – InDesign freezes and I end up force quitting. Its with this one specific document for some reason... Anyone has the same issue? Thanks,

  • Migrate PE51 form to smartform

    Hi, I have seen some posts in this forum about converting a PE51 form to smartform but not answered really. So is there any way to migrate a PE51 form to a smartform ? Thanks Subha