Sorting the level value in dimension

After mapping the dimension table to a dimension, the level value is not in order when quering the data in OWB. How can I sort the data in dimension to a specific order ie, year and month?
Thanks for your help
Edwin

Hi Edwin
Do you mean using the dimensional data viewers? No sort metadata information is captured on the dimension itself in OWB (but is for the business defs if deploying to Discoverer), so you will have to do this in the query tool or in AWM (if AW). Which implementation (AW/ROLAP) are you using and what is your planned report tool?
Cheers
David

Similar Messages

  • How to sort  the arry value in ascending order

    I have a string array where i need to sort the below values in ascending order in the same format...can anyone give me clue on this?
    9.3
    3.1
    9.1
    19.1
    19
    9.4
    9.1.1
    the sorted order should be
    3.1
    9.1
    9.1.1
    9.3
    9.4
    19
    19.1

    You may have easier luck writing your own comparator for this. These are headings in a table of contents, right?
    Write a comparator that tokenizes a string on the '.' character, or use a StringBuffer to remove them, and then order the elements according to the combined numbers. Since alphanumeric would order this list as you want it anyway you could just order that way once the '.' are removed.
    In other words your comparator would do this in the "compare" method:
    public class MyComparator implements Comparator, java.io.Serializable {
    private static Comparator stringComparator = java.text.Collator.getInstance();
    ...constructor(s), your own private "instance" variable of type MyComparator, a getInstance() method of your own, yadda yadda...
    public int compare(Object item1, Object item2) {
    try {
    value1 = removePeriods((String)item1);
    value2 = removePeriods((String)item2);
    if (value1 == null) {
    return (value2 == null) ? 0 : (-1);
    return compare(value1, value2);
    } catch (ClassCastException cce) {
    System.err.println("Wrong Object Type, JackAss!");
    protected int compare(String str1, String str2) {
    return MyComparator.stringComparator.compare(str1, str2);
    private String removePeriods(String value) {
    StringBuffer sb = new StringBuffer(value);
    int decimalIndex = value.indexOf('.');
    while (decimalIndex != -1) {
    sb.delete(decimalIndex, (decimalIndex + 1));
    }

  • How to sort the characteristic values in layout

    Hello,
    I wont to use a layout with key figs in data columns and two characteristics in lead columns. The problem is that the sorting of first characteristic values is displayed in alphabetical order. How can I change the order to another exact defined combinations for characteristic values?
    I read the thread with the same problem (see below the link), but the solutions are not satisfacroty.
    Has anyone another idee?
    Thanks for any help!
    Larissa Bräutigam

    Hi Larissa;
    I had the same problem and they propose this:
    Attributesu0092 order that the system displays in the Planning Layout
    That was not the solution presented to the customer. Because of system performance, a programmer was there and created a VBA code. But I wasn't there so I don't have the code.
    regards

  • Sort the table values in asc or desc

    I have a table named date_table contains two columns (Term,multiplier) with values given below
    Term Multiplier
    1 M
    2 M
    8 Y
    15 D
    2 Y
    24 M
    1800 D
    Values given above are term and multipiler.Means 1 M stands 1 month,15 D stands for 15 Days 2 Y stands for 2years. I need a query to select this values in asc or desc order as given below
    Term Multiplier
    15 D
    1 M
    2 M
    24 M
    2 Y
    1800 D
    8 Y

    As others have mentioned, there isn't a fixed number of days in a month or a year so it would be incorrect to assume 28, 30 or 31 days in a month or that there are 365 days in a year (as leap years have 366).
    The truest way to determine it is to calculate it using proper date functionality around a base date e.g. you could calculate it from todays date...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select 1 as term, 'M' as multiplier from dual union all
      2             select 2, 'M' from dual union all
      3             select 8, 'Y' from dual union all
      4             select 15, 'D' from dual union all
      5             select 2, 'Y' from dual union all
      6             select 24, 'M' from dual union all
      7             select 1800, 'D' from dual)
      8  --
      9  select term, multiplier
    10  from t
    11  order by case multiplier when 'D' then sysdate+term
    12                           when 'M' then add_months(sysdate,term)
    13                           else add_months(sysdate,12*term)
    14*          end
    SQL> /
          TERM M
            15 D
             1 M
             2 M
             2 Y
            24 M
          1800 D
             8 Y
    7 rows selected.
    SQL>This way, oracle will accurately work out the date offsets taking into account the number of days in each month and leap years.

  • How to Determine the levels of a cube in SQL

    Hi i know to determine the no of cubes we could use
    select * from all_cubes
    and its dimensions we use
    select * from All_cube_dimensions
    how do we determine the levels of a dimension??

    I speak better French. So you can translate with google.
    L'astuce que j'utilise est la suivante :
    1 - Extraire les données, un select
    2 - Enregistrer les données dans un fichiers txt ou csv
    3 - ouvrir le fichier avec excel
    4 - créer une colonne à gauche de la colonne contenant les données et écrire INSERT INTO TABLE VALUES (
    5 - dans la colonne de droite écrire *)*
    6 - enregistrer et tu as ton script pour transférer les données dans une autre BD.
    Bonne chance.

  • Sort the Valuenode records in table

    Hi Experts,
    Following is the code I wore to retrive and display Portal roles in a table. The context maintained is as follows and got the results properly. I want to know how to sort the table values by Role_Name?. Could some one help me?
    [Value node]      Role_table
    [Value Attribute] RoleID
    [Value Attribute] Role_Name
    [Value Attribute] PCD_Location
    //Retrive the roles from the Role factory          
    String[] theroles = rolefact.getRolesOfUser(unique_id,true);
    for(int i=0; i<theroles.length; i++ )
    //Retrive user attributes and add to the context attribute values     
    String roleid = rolefact.getRole(theroles<i>).getDisplayName();          
    String rolename = rolefact.getRole(theroles<i>).getDescription();
    String role_desc = rolefact.getRole(theroles<i>).getUniqueName();
    IPrivateUserView.IRole_tableElement rowelement = wdContext.createRole_tableElement();
    rowelement.setAttributeValue("RoleID",roleid);
    rowelement.setAttributeValue("Role_Name",rolename);
    rowelement.setAttributeValue("PCD_Location",role_desc);
    //Append the roles obtained and bind to the rolenode
    al.add(rowelement);
    wdContext.nodeRole_table().bind(al);
    Please help me with some code on how to sort the value node table?. I promise to award the points for the right solution. I appreciate coding help.
    Thank you
    Regards
    Maruti

    Hi Maruti,
    1. Get the size of the node, save it in a variable say <b>si</b>
    int si = wdContext.nodeRole_table().size();
    2. Iterate as follows
    for(int i=0;i<si;i++)   
         for(int j=i+1;j<si;j++)
             if(wdContext.nodeRole_table().getRole_tableElementAt(i).getAttributeAsText("Role_Name").compareToIgnoreCase(wdContext.nodeRole_table().getRole_tableElementAt(j).getAttributeAsText("Role_Name"))<0)
             wdContext.nodeRole_table().swapElements(i,j);
    Regards,
    Mathan MP

  • Sorting the Characters

    Hello friends,
    I have got an issue while sorting the Character values. Not sure why the same sort statement working differently with the same code in different systems (Dev and quality servers).Example of the issue is described below:
    In quality:
    We have internal table itab1 with the below format:
    field1     field2     field3
    1001     101        ab1 
    1001     101        ab2
    1001     101        ab3
    1001     101        ab4
    1001     101        ab5
    The above internal table, after sorting with field1 and field2 , it sorted as below: (SORT itab1 BY field1 field2)
    field1     field2     field3
    1001     101        ab5 
    1001     101        ab4
    1001     101        ab3
    1001     101        ab2
    1001     101        ab1
    Whereas, in dev server, it is not getting sorted, since the values inbotht the fields are same. And this is how it should work in quality server.
    Could you please helpme in finding out the reason? Thanks in advance.

    Hi Kavi,
    Do as Dengyong said use SORT with STABLE.
    this link will help you.
    Difference Between SORT and SORT STABLE - Code Gallery - SCN Wiki
    IF I did not know STABLE, I would use SORT itab1  by field1 field2 field3.
    thanks,
    vidyasagar

  • BO - Explorer  Sorting of 0calmonth values

    Is there any possibility to sort the 0calmonth values grouped by Year ?
    Data has been linked from a sap query based Universe. The Problem is that the Explorer system does not sort the values in the right direction. It should be like 11.2009, 12.2009, 01.2010 .....
    [http://www.abload.de/img/sortingzddw.jpg]

    Sorry... There is no custom sort in Explorer... What I've done once was using the Explore More... button to select the items I want, and the sequence in which items are selected matters, so this is a work around for custom sort.
    But in your case, you've got only 6 months, so there'll be no Explore More... option. I suggest change the format of the year month object. For example, put year in the front, so that Explorer will be able to properly sort it out.

  • AST Acctype Accounts - Need a different value at the PARENT level of Time Dimension

    Hi All,
    We have a planning model wherein we have the following hierarchy in the account dimension:
    CLOSECUSTOMERS
              OPENCUSTOMERS
              NET ADDS
                       GROSS ADDS
                        MIGRATE
                        DISCONNECTIONS
    CLOSECUST and OPENCUST are AST type accounts since we need as of balance, whereas the other accounts like Gross Adds, Migrations and Disconnections are EXP type, as we need a cumulation of these values for a particular period.
    Account
    Jan 2011
    Feb 2011
    Mar 2011
    Q1 2011 ( in BPC)
    Q 2011 (Required)
    Opening Customers (AST)
    1000
    1020
    1070
    1070
    1000 (Jan opening)
    Gross Adds (EXP)
       50
    100
    60
    210
    210
    Migrations (EXP)
       -20
    -30
    -30
    -80
    -80
    Disconnections (EXP)
       -10
    -20
    -70
    -100
    -100
    Closing Customers (AST)
    1020
    1070
    1030
    1030
    1030
    The business is looking for more of a summary at their quarterly level. i.e. what was the opening for the quarter, the delta changes that happened during the year, and the closing balance.
    The issue is mainly with the opening value. It takes the value from the latest month. But the value is needed from the earliest month of that calculated time period.
    We do not have a Flow Dimension in the planning model and the users need this in ad-hoc reporting as well. So we do not have an option of managing this at a reporting level (using EPMCopyRange or something similar)
    Is there any other solution to this issue?
    Any help would appreciated.
    Thanks

    Hi,
    A bit not clear requirements. You are trying to create separate accounts for Opening and Closing? Looks strange! Please, use Flow dimension for this things. Trying to emulate it on the report level will create a lot of misunderstanding...
    B.R. Vadim

  • Mapping the Fact table to different levels of a dimension

    Hi,
    I have a fact table which stores the data for 4 levels of the dimensions. The aggregation method was taken care by PL/SQL and the fact table will have the data for all the 4 levels. When im trying to map all the levels to a column in the fact table using the OEM, it is generating the F KEY constraints referncing the columns mapped for the various levels of the dimension.
    The problem is that im using a denormalised table for maintaing the values of the dimension. So the columns mapped for the levels(Except for the lowest) can't have the unique key defined on it. The cube is not getting created because of the error in creating the F KEY.
    Can u please suggest how to map this fact table.
    Thnks,
    Manohar Vanama

    I am not exactly clear on your schema but I believe you are trying to map tables which are not strict star or snowflake. This means that you cannot use CWM1 (and OEM), unless you change the structure of the tables. You might be able to map the tables with CWM2. The document below will assist you:
    Oracle9i OLAP User's Guide
    Chapter 4. Designing Your Database for OLAP
    Chapter 5. Creating OLAP Catalog Metadata

  • Not able to get the profile value set at Responsibility level

    Hi,
    I had set the value of a custom profile at Responsibility level and in CO i used the
    following code,
    String rLocation = pageContext.getProfile("XXTMG_PR_SCP_LOCATION");
    The above call returns NULL. But if i set the value of the profile at Site Level then the above code returns the correct value of the profile. I bounced the apache after the profile option was changed but no avail.
    I even tried using getOADBTransaction().getSpecificProfile() in the AM (which was
    called from CO) as below but could not get the value of the profile,
    Number lRespID = new Number(getOADBTransaction().getResponsibilityId());
    String retLoc1 = getOADBTransaction().getSpecificProfile("XXTMG_PR_SCP_LOCATION","","",
    lRespID.toString());
    Could any of you please let me know whether i have missed something in the code which results in not getting the correct value for the profile at the Responsibility level.
    Thanks, Suresh.

    Instead of passing null for the other parameters in call to getSpecificProfile, can you please set these params and try ?
    Also, please note that if a value is defined at site level, then even if a value is present at the resp level, the value at site will be returned when you use getProfile method.
    Thanks
    Tapash

  • Need to display the Stock Values at storage location level - 0IC_C03

    Hi All,
    I am developing Stock Movent Report on 0IC_C03 - Material Stocks/Movements.
    I have more than one storage location for plant. Stock quantities are calculating at storage location level and Stock Values are calculating at plant level.
    I have no issues with quantities. Only problem with Values.
    2LIS_03_UM is not picking the starage location, so that the revaualtion values are falling under unassigned nodes. When i set filter on storage location these values were not showing as they are under un assigned nodes (#).
    I want to get the Stock Quantity and Stock Values at Storage location level in my report.
    I found that soulution for that is Applying SAP Note : How to Realize summarized display of stock values on storage
    I have done development as per the document. But when i run the Query it is going to debug mode first and then it saying This program cannot display the webpage
    Can any one faced the same situation, Please help me if so.
    Thanks in Advance.
    Gopal N

    Hi Sachein,
    I am getting this An exception(CX_RSR_PROPAGATE_X) occured when debugging, and then it leads to next screen saying that:
    This program cannot display the webpage
       Most likely causes:
    You are not connected to the Internet.
    The website is encountering problems.
    There might be a typing error in the address.
       What you can try:
         Check your Internet connection. Try visiting another website to make sure you are connected. 
         Retype the address. 
         Go back to the previous page.
         More information
    Please let me know you need any more information.
    Thanks in Advance
    Gopal N

  • Sorting the list of value like in BEX but out of crystal report

    All,
    I have created a crystal report base on a BEX query where I have a variable for which  i am filtering base on a field period.fiscalyear.
    for the list of values that prompt you for this variable ...
    l in BEX we can do the sort by either alphabetical ascending order or descending alphabetical order such as:
    here is for ascending
    001.2008
    001.2009
    or by clicking on it we can do the following: (descending)
    012.2009
    012.2009
    however in crystal when refreshing the report in infoview it sorts the list of value base on the month
    something like this :
    JAN 2008 [0FISCPER].[K42008001]
    FEB 2008 [0FISCPER].[K42008002]
    We would like to have in crystal the same behaviour than in BEX,  so in crystal we would like to be able to get the list of values sorted in either ascending order to descending order. is there a way to do so ?
    notes also that we would like to avoid to create the variable in crystal
    Philippe

    Hi,
    in Crystal Reports you have per InfoObject - depending on the definition - the key value, the description and the member unique name. In BW these objects are defined as NUMC in most cases - which means it is a character / string.
    In your example the value is 001.2008 and 001.2009. What you can do in Crystal Reports is to split up the values into year and month and then sort based on the actual numbers.
    Ingo

  • How to get the Multiplied value between measure and a dimension base on user selection using dynamically

    Hi Experts,
    We had developed a cube with the Measures and Dimensions.
    I had a requirment as the measures should be muliplied by the currency value of different countries and get me the results.
    For Example.
    In SSRS report, the user will select "EUR" then the measures should multiply with the EUR based value for the particular month and get the result in the SSRS report. If the user select any other currency value, that should multiply with the measure
    value and get the result in SSRS report.
    How to do that in SSAS Cube.
    Thanks
    Shashi

    Hi ,
    If I understand your requirement  correctly , then you need currency Conversion.
    you can refer this links.
    http://consultingblogs.emc.com/christianwade/archive/2006/08/24/Currency-Conversion-in-Analysis-Services-2005.aspx
    http://www.ssas-info.com/analysis-services-faq/27-mdx/244-how-change-currency-symbol-based-on-selected-currency-dimension-member
    http://social.technet.microsoft.com/wiki/contents/articles/18672.currency-conversion-in-ssas-2012-multidimensional-tabular.aspx
    May I know , You Require all this using MDX and SSRS Parameter ?
    Thanks

  • Sort the values in Bex query variable screen

    Dear Experts,
    Is it possible to sort the values of a dropdown list for variables on BEX variable selection screen ? 
    For example, For calender month selection, the values are by default sorted by ascending order.
    Is it possible to sort by descending order ? 
    Regards,
    ravindra

    Hi Ravindra,
    yeah it is possible by writing an abap code for the field calmonth/week...etc this is depends on the F4 help of the selection field. so you need to write a code for F4 help for making it in descending order. hope it helps.
    Thanks,
    Vachan

Maybe you are looking for