Sorting Month Name

Hie Guys,
I have a dimension object - "Month" with values - 1, 2, 3, 4 as of now as the current month is April. I have created a variable for the "Month Name".
The formula is given below.
If (Month = 1) Then "Jan"
Elseif (Month = 2) Then "Feb"
Elseif (Month = 3) Then "Mar"
Elseif (Month = 4) Then "Apr"
Elseif (Month = 5) Then "May"
And so on ......
Now, my report has a cross-tab showing monthly employee hours. When using the "Month" object, I am able to sort it in ascending (1,2,3,4) or descending order (4,3,2,1). But, when I use the "Month Name" object, the months are not in order. I sorted the object with custom sort, but, since there is only data till the current month, I am only able to get - Jan, Feb, Mar & Apr in the report. In this case, when data is available for the next month, I will have to rearrange the sorting order again. Could anyone please tell me what I need to do in order for the "Month Name" column to automatically sort in order as new Month data becomes available (i.e. Jan, Feb, Mar, Apr, May, June, July, Aug, Sept, Oct, Nov, Dec)? Thanks.

Hi jeewan Pandey
This trick will work
Trick 1
1) place the Month number in cross tab coulumn
2)Now Create condition rule in 4.x , alterter in 3.x
3)Click on formula and enter the formula you had wirtten or add the month name in that
4) Now you will see the month names intead of month number on cross tab column
Trick 2
1) Place the month number on cross tab
2) place the month name above the month number in cross tab column
3)Now right click on cross tab and hide the month number dimension
Hope this will help you
Let me know still the solution is not resolved

Similar Messages

  • How to sort month names in Design studio

    Hi Community,
       Is there any way to sort month names in proper order (ie jan,feb,mar......) in design studio!!
    Please help
    Thanks
    Vivek

    As Onur suggests, if you are using BEx Queries, it is certainly possible at least in/through BEx Queries, see this answer in another thread: Re: How to create loop in Design Studio
    Regards,
    David

  • Problem of sorting month name in pivot table

    Hello,
    I have a month name that is sorted by month number in my repository.
    When I select Year + month name + measure sorted by year then by month name and I look the result in a table, everything works perfectly but when I switch to a pivot table the sorting doesn't work : the pivot table sorts my month name in an alphabetical order instead of using the month number .... Is it normal ?
    To find a solution, I have added my month number and I have sorted by year then by month number and I have hidden my column month number. This have solved my problem for the pivot table but if I attached a chart to it (by selecting "Chart Pivoted Results"), the label of the bottom axis contains the month number and the month name and I haven't found where I can hide this month number. Why the hidden option only works on the pivot table and not on the pivot chart ? And how I can do that ?
    Thanks in advance for your help.

    No there is no Transient attribute involved , could you please tell me what might cause this error .
    Basically this page is for inserting a record.
    Thanks ,
    Keerthi
    Edited by: user1140193 on Oct 21, 2011 7:15 AM
    Edited by: user1140193 on Oct 21, 2011 7:16 AM

  • How to show montha name starting from APR to MAR

    Hi,
    How to show financial year in report .
    I.e
    When i select month column in my report i need to get values starting from APR to till MAR. Can any one tell me how to show it.
    APR,
    MAY,
    JUN,
    JUL,
    AUG,
    SEP,
    OCT,
    NOV,
    DEC,
    JAN,
    FEB,
    MAR

    Hi,
    Steps to achieve,
    1. Go to analysis pull it out your month columns two times (let rename it month Id and month name)
    2.) edit formula on month Id columns put it below contional statement
    E.x:
    Case when month name = 'January' then '1'
    When month name ='February' then '2'
    When case month name='November' then '11' Else '12' end
    3.) Go to month name columns in your analysis criteria and edit formula here u just make it first 3 char of your month name columns by using left( month name, 3)
    4 ) sort month name columns by using month id columns then hide month id columns it will work as you expected
    Another solution:
    First you need to add the function monthname in the column formula. This will give you month names.
    Ex-MONTHNAME("Cal Date")
    To sort, add bin or write case statements in other column and sort it.
    Ex- case
    when MONTHNAME("Cal Date")='Jan' then 1
    when MONTHNAME("Cal Date")='Feb' then 2
    end
    Hope this help's
    Thanks,
    Satya

  • Sort By Month Name in Crosstab report

    Hi,
    I have one cross tab report in which in Datapoint I have one column which shows Month Details. When I run the reports the heading of Column comes as Month Name (ie Aug, April, Dec,.....) . Can you please help me to understand how can it be done it displayed in sorted month according to Month Name (ie. Jan, Feb, Mar, Apr.......). As per one of the Thread I tried to use to_date(Column_name) but it does not work as Column name is char column and cannot be converted to date.

    Hi ,
    What if you use the following ...in bold?????
    SQL> select ename,hiredate from emp;
    ENAME      HIREDATE
    SMITH      18/12/1980
    ALLEN      20/02/1981
    WARD       22/02/1981
    JONES      02/04/1981
    MARTIN     28/09/1981
    BLAKE      01/05/1981
    CLARK      09/06/1981
    SCOTT      18/04/1987
    KING       17/11/1981
    TURNER     08/09/1981
    ADAMS      21/05/1987
    JAMES      03/12/1981
    FORD       03/12/1981
    MILLER     23/01/1982
    14 rows selected
    SQL> select hiredate , to_number(to_char(hiredate,'MM')) from emp order by 2;
    HIREDATE    TO_NUMBER(TO_CHAR(HIREDATE,'MM
    23/01/1982                               1
    20/02/1981                               2
    22/02/1981                               2
    02/04/1981                               4
    18/04/1987                               4
    21/05/1987                               5
    01/05/1981                               5
    09/06/1981                               6
    08/09/1981                               9
    28/09/1981                               9
    17/11/1981                              11
    18/12/1980                              12
    03/12/1981                              12
    03/12/1981                              12
    14 rows selectedOR ....
    EVEN BETTER AS YOU NEED THE MONTH NAME....
    SQL> ALTER SESSION SET NLS_DATE_LANGUAGE='AMERICAN';
    Session altered
    SQL> select hiredate , to_char(hiredate,'MON') , to_number(to_char(hiredate,'MM')) from emp order by 3;
    HIREDATE    TO_CHAR(HIREDATE,'MON') TO_NUMBER(TO_CHAR(HIREDATE,'MM
    23/01/1982  JAN                                                  1
    20/02/1981  FEB                                                  2
    22/02/1981  FEB                                                  2
    02/04/1981  APR                                                  4
    18/04/1987  APR                                                  4
    21/05/1987  MAY                                                  5
    01/05/1981  MAY                                                  5
    09/06/1981  JUN                                                  6
    08/09/1981  SEP                                                  9
    28/09/1981  SEP                                                  9
    17/11/1981  NOV                                                 11
    18/12/1980  DEC                                                 12
    03/12/1981  DEC                                                 12
    03/12/1981  DEC                                                 12
    14 rows selectedRegards,
    Simon
    Message was edited by:
    sgalaxy

  • Grouped by Month Name.  How do I sort it correctly?

    I have a report grouped by a field name that contains only the names of the month (ie. January, February, etc).
    When displayed on the report, it'll sort the groups alphabetically (ie. April, then August, then December).
    Is there any way to have these group be sorted in the actual month sequence?

    Group on this formula:
    month ()
    This will group numerically 1 through 12.
    Then simply DISPLAY the month name in your group header using this formula:
    MONTHNAME ()

  • Sort the month name column based on month id in rpd itself only

    sort the month name column based on month id in rpd itself only without creating the logical column.

    Hi,
    sort the month name column based on month id in rpd itself only without creating the logical column. Can you be bit specific?
    Is this what you want..http://www.biconsultinggroup.com/knowledgebase.asp?CategoryID=198&SubCategoryID=368
    Regards,
    Srikanth
    http://bintelligencegroup.wordpress.com

  • Sorting column name in cross tab

    Hi Experts,
    How to sort the column name in cross tab.Crystal is sorting alphabetically like
    Apr 2013 Apr 2014 Aug 2013 Aug 2014 Dec 2013 Dec 2014 Feb 2013 Feb 2014 Jan 2013 Jan 2014............................so on
    But i need result like
    Jan 2013 Jan 2014 Feb 2013 Feb 2014 Apr 2013 Apr 2014 Aug 2013 Aug 2014  Dec 2013 Dec 2014
    I am using crystal report 2013 version.
    Kindly see the attached file

    Hi Bharathiraja,
    Instead of using a string field to display the month names, use a Date field as the column of the Crosstab.
    You can then, highlight the column in the crosstab expert > Options > Options tab > check 'Customize group name field' > click the formula button beside 'formula' and use this code:
    Totext({DATE field}, 'MMM yyyy')
    -Abhilash

  • Sorting month Chronologically ( column 1 )

    I have a cross tab report showing "agent performance" by "month", the report is laid out like this
                                                 April-2010           Feb-2010        Jan-2010
    Average handle time
    Average talk time
    Everything works as it should except the way the months are sorted. The months are being sorted alphabetacally instead of chronologically. In other words, I would like jan-2010 come first followed by Feb-2010 then march 2010 and so on.
    I guess some formulas need to be used. Any help will be greatly appreciated.
    Thanks
    Param

    Hi Paramads, I assume you are not deaing with a true date.
    so...
    You can create a grouping formula,
    If {Your Field) = "Jan" then 01 else
    If {Your Field) = "Feb" then 02 else
    If {Your Field) = "Mar" then 03 else
    etc...    thru 
    If {Your Field) = "Dec" then 12
    This assume you are dealing with a month name instead of a number, if this does not help,
    post what your data actually looks like.

  • Alternate Sort - Month

    Hi All,
    We set up the following Alternate sort custom folder:
    Select to_date(MONTH_OF_YEAR,'MON'), ALTERNATE_SORT
    FROM
    select 'December' MONTH_OF_YEAR , 1 ALTERNATE_SORT from dual union
    select 'January' MONTH_OF_YEAR , 2 ALTERNATE_SORT from dual union
    select 'February' MONTH_OF_YEAR , 3 ALTERNATE_SORT from dual union
    select 'March' MONTH_OF_YEAR , 4 ALTERNATE_SORT from dual union
    select 'April' MONTH_OF_YEAR , 5 ALTERNATE_SORT from dual union
    select 'May' MONTH_OF_YEAR , 6 ALTERNATE_SORT from dual union
    select 'June' MONTH_OF_YEAR , 7 ALTERNATE_SORT from dual union
    select 'July' MONTH_OF_YEAR , 8 ALTERNATE_SORT from dual union
    select 'August' MONTH_OF_YEAR , 9 ALTERNATE_SORT from dual union
    select 'September' MONTH_OF_YEAR , 10 ALTERNATE_SORT from dual union
    select 'October' MONTH_OF_YEAR , 11 ALTERNATE_SORT from dual union
    select 'November' MONTH_OF_YEAR , 12 ALTERNATE_SORT from dual
    The problem is that when we join this to the Auto Month Item in the folder that its not sorting correctly.
    Should we be using a different Mask for date conversion?
    Thank You,
    -Gus

    Hi Gus
    An alternate sort only works with a list of values when the alternate item is available within the original data set, you cannot use an alternate sort on a data column using an item in a different folder. The LOV will sort but not the data items themself.
    To get around this, what you need to do is to create a new calculated item in your report, using a DECODE on the month, and create new values that can be sorted.
    For example, here is a workflow that will create a new sort item for your first 3 months, December, January and February:
    1. Create a new calulated item NEW_MONTH
    2. Use this code inside the calculation:
    DECODE(Month, 'December', '1. December', 'January', 2. January', 'February', 3. February', Month)
    3. Place a sort on the NEW_MONTH item
    By prefixing the month names with a number, we can now use a natural sort to place the months in their correct order.
    Does this help?
    Regards
    Michael

  • ITunes 11: In the store, I can no longer sort by name/artist/album

    I can no longer sort by name or artist or album when I'm in the store with iTunes 11.  Yes, I discovered the View Options in the Menu Bar. By when I select it nothing opens. Same for Command-J. It doesn't do anything either. I've tried hitting Command-J repeatedly, but nothing.
    The fact is, it seems utterly stupid to have this work differently than when you're in your library---by simply hitting name/artist or album in the bar at the top of the list. Having to sort lists in the Store via a completely different method than the lists in one's library is totally counter-intuitive.
    But back to my problem:  The View Options won't open for me. Anybody know how to fix this?
    I've got a lot of music I wish to buy, but I need different methods of sorting, otherwise it'll be a nightmare trying to keep track of things.
    Thanks,
    Doug

    I have the same exact problem.  I am using a Windows computer running Windows 7.  I was able to see them prior to the installation of 10.4.  I have this problem on 2 computers and have a hard time believing that no one else is having this problem

  • Month name displayed in month calendar view for previous month

    In iPad IOS 7.04 iCal month view the month name displayed at the top of the window is incorrect. The previous month name show when viewing a calendar month. Test by selecting year view and the any month from the year. The month view will be for the selected month, but the month name will be for the preceding month. The incorrect month name in month vie is also displayed if the month view is scrolled to new months.
    I observe this on my iPad II.
    Ha s anyone seen this error? Does anyone know if Apple has seen this and has a plan to correct it?

    Imhave the same exact problem on my iPad2.  It was not fixed in the recent iOS 7.1 release, even though modifications were made to the calendar app.  Very frustrating, since this is such an easily observable problem.

  • Checking for month name and number in different language?

    I have to let people search for documents by date. The database is used by French-speakers as well as English-speakers. The search allows users to type in free text (because it's not just dates they might search by, though if they do type in something that's intended to be interpreted as a date, that's the only thing they're allowed to type in). So, I might get '23/Apr/2009' or '2009/04/23', for example. (I also have to allow them to submit 23.04.2009 and 23 04 2009 and any combination of the above!)
    I have written a function which breaks the string into three bits, and then I work out if each bit is a year, or a month, or a day with simple rules (eg, if it's a number between 1900 and 2400, it must be the year component).
    When it comes to the month, I do two things. One is obvious: is it a number between 1 and 12? The other is, is it a month name that appears in a list of 'allowed' month names. So my function does this at the start:
    v_validmonths := 'january,february,march,april <and so on>';
    v_validmonths := v_validmonths || ',janv,fevr,avr,mai, <and so on>';Then I do this:
        for x in 1 .. listlen(v_validmonths,',') loop
          v_probemonth := listgetat(v_validmonths,x,',');   
          if instr(lower(v_partone),v_probemonth) > 0 then
            v_month := extract (month from to_date(v_partone,'MON'));
          end if;
        end loop;   IE, I compare the first component of the string (v_partone) with the list of allowed month names. I repeat that for the other two parts of the supplied string. As you can see, if one of the parts of the supplied string matches an allowed month name, I then try to extract the month number into a variable, using Oracle's own extract function.
    And that's where my problem arises. Because although "aout" is valid French for August and is permitted by my list of valid months, the extract function fails to understand it. A simple select extract (month from to_date('AOUT','MON')) from dual, for example, gives an ORA01843 (invalid month).
    How can I get the code to work with French (and German, actually) months and month abbreviations whilst also being able to understand English ones? Is there an in-built function that would allow me to do this? Or is there some way neatly to say, 'yes: AOUT is in the list, and it's month 8' without me having to rely on the extract function to work it out?
    (I realise that the business requirement here is very peculiar and your first reaction will probably be "this is horrible!". I will absolutely agree with you! But this is the requirement as has been explicitly specified by the MD and I can't negotiate it away, sadly.)

    Hi,
    Many of Oracle's date functions allow a parameter where you can override the current NLS settings only for that function call.
    For example:
    SELECT  TO_DATE ( 'JUIL.'
                     , 'MON'
                     , 'NLS_DATE_LANGUAGE=FRENCH'
                     ) AS month
    FROM    DUAL;You could also create your own table of month names
    NAME     NUM     LANGUAGE
    JANVIER   1     FRENCH
    JANV       1     FRENCHand look up the names in this table, rather than in a string hard-coded in the function. This might be especially useful if you wanted to allow your own abbreviations or spellings (e.g., ignoring accent marks).
    Edited by: Frank Kulash on Dec 16, 2010 11:40 PM

  • In Bookmarks, when I right click on a bookmark "SORT BY NAME" is no longer there. how do I get it back?

    In Bookmarks I used to be able to right click on a bookmark and in a menu box I could click on, SORT BY NAME, sort by name is no longer in the right click menu. I don't want to have to drag to sort bookmarks as I have too many. How do I get "SORT BY NAME" back in the right click menu in Bookmarks? Thanks, HT

    In Firefox the option to sort bookmarks is only available for folders and not for individual bookmarks.
    Easiest to sort by name is to do that in the left pane of the Bookmarks Manager (Bookmarks > Show All Bookmarks) and right-click the folder that you want to sort.
    *https://support.mozilla.org/kb/Sorting+bookmarks

  • How to create a formula to get the month name based on userresponse

    Hi,
    I have created a report using E-Fashion - Actually i need  a report like  -  For ex i need 4 months data from 12 months
    My report should display the 4 months data along with starting & end month data in the next 2 columns
    I have used the prompt to fetch the data & i have created a formula in the cloumn like below:
    For the column haader i have given = Tonumber(userresponse("Enter start:")) - I am getting the Month number in the header But i need the month name in the header.Please guide me
    Regards
    Karthika

    Hi Ram,
      Thanks for your Help.I tried in an another way like I created 2 Variable -
    Start Date  =UserResponse("Enter Month(Start):"
    End Date = =UserResponse("Enter Month(End):"
    I have created the column header for
    start date:
    =If([start Date] = "1";"January";If( [start Date] = "2"; "February";If([start Date] = "3";"March";If([start Date] = "4";"April";If([start Date] = "5";"May";If([start Date] = "6";"June";If([start Date] = "7";"July";If([start Date] = "8";"August";If([start Date] = "9";"September";If([start Date] = "10";"October";If([start Date] = "11";"November";If([start Date] = "12";"December"))))))))))))
    End Date:
    =If([End Date] = "1";"January";If( [End Date] = "2"; "February";If([End Date] = "3";"March";If([End Date] = "4";"April";If([End Date] = "5";"May";If([End Date] = "6";"June";If([End Date] = "7";"July";If([End Date] = "8";"August";If([End Date] = "9";"September";If([End Date] = "10";"October";If([End Date] = "11";"November";If([End Date] = "12";"December"))))))))))))
    For the Datas in the column:
    Start Date:
    =[Sales revenue] Where([Month]=ToNumber(UserResponse("Enter Month(Start):")))
    End Date:
    =[Sales revenue] Where([Month]=ToNumber(UserResponse("Enter Month(End):")))
    I got the Report format as i required
    Thanks
    Karthika

Maybe you are looking for

  • How can I ask MBP to use a specific router in my office?

    Here is the situation. My office is using lot of access point to create a wireless network environment. I think all of the wireless router is connected by cable to the main server in office. Most of them are G mode by one of it is N mode. I would lik

  • Finding Contacts/Cards

    I recently had my eMac crash. Fortunately the Mac store I took it to was able to recover everything on the hard drive and put it on an external hard drive. I am now using my new iMac and need to locate all of my cards that were in the old eMac. Where

  • Open in new tab in browser

    Anyone know if it is possible to open in a new tab in a suitable browser rather than open in a new window? Doug

  • Whenever I send A text Message

    Hello And thank you for reading my post. I have a problem when I send a text message it always says rite after it sends nothing to undo. I dont know If this is a software problem or if its just something maybee that I hit in the settings when I got t

  • HT1526 cant empty my trash

    Hi there, Can anyone help me out? I can't empty my trash :-( Mac Mini I get a warning with locked items and i've followed the steps on the help pages but nothing!