How to apply sorting for each level of a hierarchy?

I'm using SSAS OLAP and I want to apply sorting of the levels of a hierarchy.
I know that I can sort the whole hierarchy via ORDER function (I have some issues when I'm trying to apply DESC sorting
on the whole hierarchy), but what I really want to achieve is sorting of a specific level. For example in the [Date].[Calendar] hierarchy (Adventure Works Cube), I want to have ASC sorting
of years, DESC sorting of Quarter, ASC sorting
of Months, etc. I do not want to break the hierarchy (using BASC or BDESC), I just need them sorted on the same level. Do you have an idea if this is possible at all?
My idea is to sort the levels based on their key, not by the measure. For example if we have the following structure:
-2009
 -Q1
   -Jan
   -Feb
 -Q2
   -May
   -June
-2010
 -Q1
   -Jan
   -Feb
 -Q2
   -May
   -June
I would like to be able to sort the data in the following order (DESC for years, ASC for Quarters, DESC for months):
-2010
 -Q1
   -Feb
   -Jan
 -Q2
   -June
   -May
-2009
 -Q1
   -Feb
   -Jan
 -Q2
   -June
   -May 
Thanks in advance for your help!

Hi Rosen,
According to your description, you want to sort the different hierarchy members in different order, right? Generally SQL Server Analysis Services doesn't provide a way to sort dimension members in Descending order. SSAS provides only Ascending order. We
can achieve this sort functionality by using a simple trick. However, the order is used for all the members of different hierarchy under this dimension. So I'm afraid that your requirement cannot be achieved. 
Reference:Sort Dimension Members in DESCending order
Thank you for your understanding.
Regards,
Charlie Liao
TechNet Community Support

Similar Messages

  • Different chart for each level hierarchy in report designer

    Is there a way to display a different chart for each level of the hierarchy in a report designer? I want a different chart for each level. That is, if there are 5 nodes in level 4, I want 5 different nodes. Is there a way to do this? I tried to insert the chart inside a cell in each level, but it shows the same chart for all nodes instead of a different chart for each node.

    Has any one tried using a context sensitive chart?  According to this, it seems like this should be possible, but I am having no luck.
    http://help.sap.com/saphelp_nw70/helpdata/en/47/a99a0a5fdb0985e10000000a42189c/frameset.htm

  • How to create a custom measure for each level of a dimension

    Hi all!
    Can Anyone please explain me with an example, how to create a custom measure for each level for a dimension? I dont mine if you use
    one or more measures.
    thanks in advance
    hope someone helps me.

    For example:I create a dimension for product_dim witch has 4 levels:total, class, family and item:
    d_aben18
    n1_aben18
    n2_aben18
    n3_aben18
    n4_aben18
    herarchy:h_aben18
    cube:cubo_aben18
    measure:med_aben18
    I create this code to fetch the data to the dimension:
    TRAP ON CLEANUP
    SQL DECLARE c1 CURSOR FOR SELECT-
    total_product_id,1,'N1_ABEN18',total_product_dsc,-
    class_id,1,'N2_ABEN18',total_product_id,class_dsc,-
    family_id,1,'N3_ABEN18', class_id, family_dsc,-
    item_id,1,'N4_ABEN18',family_id,item_dsc-
    FROM PRODUCT_DIM
    "OPEN THE CURSOR
    SQL OPEN c1
    "FETCH THE DATA
    SQL FETCH c1 LOOP INTO-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N1_aben18_LEVELDEF,:D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N2_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N3_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    :APPEND D_ABEN18, :D_ABEN18_H_aben18_HIERDEF,:D_ABEN18_N4_aben18_LEVELDEF,:D_ABEN18_parentrel,-
    :D_ABEN18_long_description,-
    "SAVE THE CHANGES
    UPDATE
    COMMIT
    CLEANUP:
    SQL CLOSE c1
    SHOW 'KK2'
    Then I create a cube with use compression off, and in rules sum for example.
    After, I create a measure and I select Override the aggregation specification for the cube, in rules I put nonadditive and I would like to create aprogram to assign distinct values to each level of the dimension. For example, I put 1, 2 3, and 4 values, but at the end I would like to put count(distinct(values)).
    for that I create another program:
    VRB D_RETURN DECIMAL
    if D_ABEN18_N1_ABEN18_LEVELDEF eq 'N1_ABEN18'
    then D_RETURN = 1
    if D_ABEN18_N2_ABEN18_LEVELDEF eq 'N2_ABEN18'
    then D_RETURN = 2
    if D_ABEN18_N3_ABEN18_LEVELDEF eq 'N3_ABEN18'
    then D_RETURN = 3
    if D_ABEN18_N4_ABEN18_LEVELDEF eq 'N4_ABEN18'
    then D_RETURN = 4
    else d_return=26
    return d_return
    "SHOW D_RETURN
    cubo_aben18_med_aben18_stored=d_return
    but it doesnt work.I dont know how to put to assign or to see what I want.
    I report the measure, or I report the program, but then how can I see the values of the measure?
    thanks in advance

  • How to get LASTDAY for each and every month between given dates..

    Hi Friend,
    I have a doubt,How to get LASTDAY for each and every month between given dates..
    for ex:
    My Input will be look like this
    from date = 12-01-2011
    To date = 14-04-2011
    And i need an output like
    31-01-2011
    28-02-2011
    31-03-2011
    is there any way to achieve through sql query in oracle
    Advance thanks for all helping friends

    Here's a 8i solution :
    select add_months(
             trunc(
               to_date('12-01-2011','DD-MM-YYYY')
             ,'MM'
           , rownum ) - 1 as results
    from all_objects
    where rownum <= ( months_between( trunc(to_date('14-04-2011','DD-MM-YYYY'), 'MM'),
                                      trunc(to_date('12-01-2011','DD-MM-YYYY'), 'MM') ) );
    The above two query is worked in oracle 11GActually the first query I posted is not correct.
    It should work better with
    months_between(
       trunc(to_date(:dt_end,'DD-MM-YYYY'),'MM'),
       trunc(to_date(:dt_start,'DD-MM-YYYY'),'MM')
    )Edited by: odie_63 on 12 janv. 2011 13:53
    Edited by: odie_63 on 12 janv. 2011 14:11

  • How to apply license for SSM 7.5 & Netweaver CE 7.1?

    How to apply license for SSM 7.5 & Netweaver CE 7.1?
    My application server java in SAPMMC: appear message: no valid license found.
    Acually we already bought license and download,
    So, how to solve this license problem?

    Chamnap,
    When your NetWeaver license expires, it can be restarted, but will only run for 1/2 hour, to allow installing a new license.
    Step 1- Start NetWeaver CE from the control console
    Step 2 - Log on to NetWeaver Administrator http:///[server]:50000/nwa and go to Configuration tab then Infrastructure sub-tab, then Licenses
    Step 3 -  Make note of your System Number and Active Hardware Key in the System Parameters section
    Step 4 - Navigate to the Service Marketplace http://service.sap.com/licensekey
    Step 5 - You are looking for SAP Business Suite - SAP Products with ABAP Stack, Without ABAP stack (WEB AS Java-J2EE Engine) SAP Enterprise Portal link
    Step 6 - Fill in your Hardware Key and System # -  Make sure you choose this License Type: J2EE Engine - Web Application Server Java (it is not the default selection)
    Step 7 - A message at the bottom of the page will note a new key has been generated and you can Download the txt file needed (you also receive an email with the info as well)
    Step 8 - (Restart NetWeaver CE - if its timed-out) On the Licenses page of nwa click Install from File > Browse to the txt doc you downloaded and ADD
    You now have the new license install. Make note of the date to schedule the time for any future updates, so that service is not interrupted.
    If you cannot access the license key on the Service Marketplace you will need to contact your SAP account representative.
    Regards,
    Bob

  • How  Assign a Buyer for Each Material

    Dear experts ,
                        How  Assign a Buyer for Each Material ,  for example,This person is going to buy this material in purchase dept. is there any  possiblities
    regards,
    Raja

    hello,
    u can achieve same results by following simple way
    create purchase document types for example for raw material purchase,consumable purchase etc
    then assign buyer from personal setting from each buyers computer.
    regards
    kedar

  • How to enable DFF for each line level on a Table Region - very very urgent

    Hi,
    I have a Master- Detail Page, Detail is Table region. I need to enable DFF (Context Based) for each line. If any one has done similar requirement please share how to do this. Its very very urgent.
    It is a standard page.
    Thanks,
    Edited by: user8996062 on Jun 29, 2011 2:58 AM

    Can any one please help me on this it is very urgent.
    Thanks,

  • How to apply sort on an already dispaled resultset from a procedure

    Hi,
    I have a data block for which the 'query data source type' is PROCEDURE. When I query the block all the records in the procedure are displayed. Then I query for a specific value for the DATE column (ex: 27/07/2010) and it displays records for only 27/07/2010. Now I want to sort the displayed records.
    My columns are DATE, TRANSACTION NUMBER, PROJECT CODE
    I have a button each for DATE, TRANSACTION NUMBER, PROJECT CODE to do the sorting. When I click on the PROJECT CODE sort button , the already retireved records for 27/07/2010 must be sorted according to project code.
    But this is not happening. The current coding will query the data block for all the records and then apply the sorting for DATE column.
    Please advise.

    Actually i don't know but what i gave u but i have read that If you attempt setting the where clause in the block it is totally ignored.
    i hardly search just found the following...
    Subject:  How to Filter Rows on Block Based on Stored Procedure in Oracle Forms? 
      Doc ID:  Note:1078147.6 Type:  PROBLEM 
      Last Revision Date:  22-JUN-2004 Status:  PUBLISHED 
    Problem Description: 
    ==================== 
    Whilst in ENTER QUERY mode you would like to specify a search criteria to 
    restrict the results of your query.  The block on which this query resides
    is based on a stored procedure. 
    Problem Explanation: 
    ==================== 
    If you attempt setting the where clause in the block it is totally ignored. 
    This happens with both the 'Ref Cursor' or 'Table of Records' variable.    
    Problem References: 
    =================== 
    [Search Words: filter ]
    Solution Summary: 
    =================
    With Forms 5.0 and above, you can use the Tools--> Datablock Wizard menu 
    in the Object Navigator to enter the datablock wizard in a re-enterant mode.
    You can then specify the query criteria there. 
    Alternatively, you can pass the query criteria from Forms to the stored 
    procedure as an IN argument. You can then use the parameter with the 
    select statement (in the procedure you have created using the 'Table of Records
    or 'Ref Cursor').
    Solution Description: 
    ===================== 
    If the blocks were created using the Datablock Wizard with the
    "stored procedure" radio button, you can always re-enter the datablock wizard
    for that block by clicking on the Tools-->Datablock Wizard. If you go to the 
    Query tab on the bottom of the tab page you will notice that it requests the 
    name of the parameter. This is where you enter -
       :parameter.<parameter_name> 
    This method relies on having a parameter in the form that passes the 
    value, for example p_deptno, into the stored procedure. This is done in order
    to get the corresponding records from the emp table for all employees who work
    in that deptartment.
    Additionally create a PRE-QUERY trigger and assign the value of the deptno you 
    are passing through this parameter using the following:
       (:parameter.<parameter_name>:= :dept.deptno).
    If the blocks were created manually, however, YOU CANNOT use the re-enterant 
    option to go to the Datablock Wizard. For these type of blocks, use the method
    suggested below.
    METHOD FOR MANUALLY CREATED BLOCKS:
    ===================================
    Re-enter the Datablock Wizard by using the Tools--> Datablock Wizard menu of the 
    Object Navigator.  You will notice that you will not be able to see any 
    procedure in the Datablock Wizard in re-enterant mode.
    To use this method, you will need to include one more parameter to your query
    procedure as an IN parameter. For example, if you are passing deptno as query
    criteria, click on the "Query Data Source Arguments" of your block property 
    sheet and include the following:
        ARGUMENT NAME: set to  P_DEPTNO or (any variable name)
        TYPE: set to the appropriate datatype, for example, NUMBER
        TYPENAME: set to dept.deptno%type, for example
        MODE: set to IN
        VALUE: set to :dept.deptno(the :blockname.itemname you are passing
                                   as query criteria.).
    In the query procedure, include this parameter as an IN argument, and as the 
    2nd parameter.  For example:
        Procedure  empquery_refcur(emp_data IN OUT empcur, v_dno IN number) AS ....
    Finally, include this paramter in your select statement of either 'Table of 
    Records' or 'Ref Cursor' as
        select empno, ename
         from emp
          where deptno=nvl(v_dno, deptno);But no chance to Sort it may be from inside the procedure itself.
    Hope this helps...
    Regards,
    Abdetu...

  • Applying Sorting for the Month Field

    Hi,
    When i apply sort to the month-name field for each quarter(Q1,Q2..), it sorts as 1)February 2)January 3)March..
    Its sorts the month-name field in alphabetical order(F,J,M) not in the usual 1)January 2) February 3)March order..
    To sort this issue i added the numeric field called month with values 1,2,3..
    How to sort the month-name field as January, February???

    And if you're still struggling, [read this|http://blog.davidg.com.au/2011/03/sorting-months-in-webi.html].

  • BEx Analyser: How can I define colours for different levels of a hierarchy?

    Hi everyone,
    I have a report in BEx Anaylser that includes a hiearchy of 9 levels.
    For a better overview, I want to define different colours for the cells of each level. In this way, the user should be able to see which numbers belong to which hierarchy level. How can I do this?
    Best regards
    Daniel

    Dear Anujit,
    Thanks for your answer.
    Seriously? I cannot do this with BEx Analyzer other than using Excel VBA macro?
    Cheers, Daniel

  • Tree with checkbox for each level

    1. I have a tree an I want to add a check box to every node. I saw this fonctionality with Java and with a lot of programs (install with choises). I don't know if this is possible with FORMS. If not how knows a solution for this problem ?
    2. My tree is based to a SELECT and I want to add a parent for my tree
    and I don't know how to do it. The problem is this : the value for each node from the first level IS NULL.
    Thanks
    Bye

    I need this functionality because I have to select data's from a tree with 3 or 4 levels (like in the install software when we select to install only what we need).
    There is a lot of information and it's difficult to display all of it in the screen.

  • Two printers with different paper sizes. How to setup defaults for each?

    I have two printers connected to my beloved Mini: Samsung ML-1610 & Epson AccuLaser C1100.
    First printer uses American Quarto US Letter paper.
    Second one - European A4.
    Every time I try to print anything on either of them I receive a message from printer driver that paper size mismatched. Further more either printer will wait until I press buttons on them to "proceed". Which is very annoying to say the least.
    How can I setup defaults for every printer in Mac OS Leopard? If I use printer preferences dialog it will setup either size for both printers rather than for each its own.
    Please advise.

    PAHU wrote:
    You cannot do exactly what you want from a user interface perspective. I am not sure if such a thing is possible by making changes to hidden files. I certainly haven't heard of it but it may still be possible.
    From what I have seen, the page setup dialog is independent of the print dialog. If you set the 'Format for' to one printer, a then choose a different printer when you print, the previous settings won't apply.
    You could see if the printer set to A4 supports automatic conversion of LTR to A4. Then at least it won't ask for attention when you send a LTR page to it. Otherwise I think your only option is to check before you print that you have selected the correct paper size for the printer.
    PaHu
    That's freaking ridiculous!!!
    You've got to be kidding me... right?
    Even MacOS 8 could do this.
    Like it's horrible for me because I print a lot of photos. So I set my default paper type Format for: Canon MP610 series, Paper Size: US Letter (borderless). But then when I go home and print web pages or text documents on my Apple LaserWriter 16/600 PS, then it still remains set to Format for: Canon MP610 series. The freaking OS knows what printer I'm using; why would it remain formatted for the other printer even though that will cut off the edges of all my prints (since the LaserWriter does not do borderless printing) -- and not even warn me?! I just wasted 30 pages!
    I cannot tell you how preposterous it is that a modern OS like Mac OS X cannot even get a simple thing such as printing correct. How could they screw up PRINTING?!
    -Jon

  • How to create buttons for each slide in slideshow

    I currently have a slideshow working with prev and next buttons,
    but would like to add numbered buttons for each slide at bottom of images,
    with a static number for the active slide that has a colored circle around that number.
    I can create static number with colored circle in Photoshop and add that to a layer,
    but it's labor intensive to do that for all numbers.
    Is there a better way to create the highlighted numbers for active slide?
    For numbered buttons that link to non-active slides, I can create numbers in Photoshop and import images into Flash,
    then convert to symbols and assign actions for them,
    But that too is labor intensive to do for all the numbers.
    Is there a better way to create numbered buttons for non-active slides?
    I'd also like to have a hover function on the numbered buttons,
    that changes from plain image of number to number with colored circle like I want to use for active slide.
    How do I assign a hover function to button symbol, that will load another image or symbol?

    Try to think in terms of having reusable symbols.  Think it thru before you try it.
    Use a movieclip symbol instead of a button.  Have a dynamic textfield in that movieclip for the number, and set the textfield to not be selectable.  Have one frame of this movieclip where it displays as the highlighted (selected) one and have the movieclip go there where you are on that slide.
    Use the textfield for the number--assign it dynamically so that you don't have to import an image for it.  Use as many of these movieclips as you need to for all your buttons.
    Have functions that reset all the buttons at once so that when you move to a new slide, the previously selected one goes back to mormal... follow that with setting the newly selected one to be in its "selected" frame.

  • How to get sum for each currency's in ALV Report

    Hi,
    A column has amounts with various currency's.
    May I know how to get sum quantity for each currency in ALV Report?
    Thanks in advance.

    Hi,
    Currency value column should have reference to currency code column.
    Regards,
    Wojciech

  • How to apply filters for union all report in OBIEE 11g

    Hi All
    Can we apply saved filters to union reports in obiee 11g?
    I am able to apply saved filters for normal reports but not for union reports.
    The catalog pane is blank, when i click on result columns or each criteria.
    The only option i see is to manually create the filters for each criteria, dont i have any choice to use a saved filter for union report?
    Is this a bug or something i am unaware. Please guide me
    Thanks

    Hi manu,
    Filter is created based on subject area.we can't use save filter in any other subject areas.
    now we can use new filter for union reports.
    if Helps please mark as correct.. :)

Maybe you are looking for

  • How to use one apple ID on 2 iphones 4s but not sync aps

    My wife and I just bought 2 iP4s' and use Win7 machines at home for iTunes. We have been sharing an apple ID for apps previously since we used 2 iPods + 1 iP 3 previously. Now, when I download an app, her phone tries to download the same app. The opt

  • How can I remove my icloud pictures on my iPhone

    Hi! Since last september I have a macbook, I have connected my macbook with my iPhone. All my pictures on my macbook are now on my iPhone but I don't know how to delete them. Can you tell me how to do this? Your Sincercenly, Nynke Dijkstra

  • Strange Behaviour into Runtime Workbench

    Hi all, I have a question for us. Into our system PI 7.1 we have a strange behaviour in Runtime Workbench - Message Monitoring. When I choose for the fiel "FROM" the value "Database" I obtain the list of software component that I find the value "Inte

  • Prevent Text Boxes to shrink as big as the text in it - move existing InfoPath form from SharePoint 2007 to SP2013

    Hello Together, we have some simple InfoPath forms in place. With SharePint 2007 they are working well. Now we will move to SharePoint 2013. It was easy to re-publish them on a SharePoint 2013 Site and to work with, but i have an optical / technical

  • Persistence behavior checking error with MSSQL 2000

    Hi, We are having some problems with the Presistent Behavior Checking fucntion. When we turned that on, we found out that once we add the 'com.bea.b13n.trackig.listeners.BehaviorTrackingListener class' to the event service, navigating the samples tem