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

Similar Messages

  • 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 crosstab report 10.1.3.2.1

    hi,
    i have crosstab report build with bipublisher 10.1.3.2.1.
    in column, i have jan'11 feb'11 etc but not sorted correctly(it should be ordered by numeric not character).
    any advise will be higly appreciated.
    thx.
    regards,
    tyo

    You need to either convert these to a date in canonical format and sort based on date,
    Or convert these months to number and sort based on number to have the months sorted correctly

  • 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

  • Wanted to have all previous 6 Months name in sequence....

    Hi
    I am using BI BEx Designer tool for generating a report on month basis having 0CalMonth on column side like Jan'10 to Jul'10.
    Now the problem is if there is no transaction for any month then we wont' get that month name in the report, but i wanted to show all the last 6 months Names in sequence for the data & should show the char value 0 for the month which we dont have trx.
    How to do it. Pls let me know if you find any solution on this.
    Thanks...

    Build a structure In the query designer, containing 6 elements:
    The 1st one you filter on JAN and name January, the 2nd one you filter on FEB and name February, etc...
    In the query properties you have to make sure you have no zero compression active.
    This way the structure will alway display and a zero will show even if you don't have any transactions in the cube.
    Best,
    Ralf

  • 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 ()

  • 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

  • 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

  • Display Month verbiage on chart but sort by month number

    Hello,
    I have inserted a simple bar chart (values by month for a single year) and my goal is to get the data values to group by month.
    I found that I can achieve this by using a formula that extracts the month from my Date/TIme field MONTH({Command.OB_DELIVERY_DATE}).
    This works OK and displays months as 1, 2, 3,  etc. on my chart), but I want to display the month text instead (Jan, Feb, Mar)
    I tried a second variable:  ToText({Command.OB_DELIVERY_DATE},'MMMM')
    This works in displaying the verbiage of the months, however, the problem is that it groups the months on my chart alphabetically now (April is now my 1st month instead of January).
    What is the trick to displaying month verbiage on my chart, but still sorting these months in their proper numerical order?
    Many Thanks!

    Hi Dave,
    Try this please:
    1) Insert a Crosstab and place it on the Report Header. Use the Delivery Date field as the row and add the measure field as the Summary Field with the right Sum function
    2) Highlight the Delivery Date field > Group Options > set it to print 'For Each Mointh'
    3) While in the Crosstab Expert highlight the Delivery Date field > Click Group Options > Options  tab > check the option 'Customize Group Name field' > Select 'use formula as group name' and click the formula button beside. Use this code:
    ToText({Command.OB_DELIVERY_DATE},'MMMM')
    4) Right-click the Crosstab and select Insert Chart. Choose the right Chart Type
    5) Suppress the Section that holds the Crosstab
    Hope this helps.
    -Abhilash

  • How to edit axis labels in CR charts for crosstab report?

    I have a crosstab report created from tha table where column names havie sort order attached to it as 01_Jul FY10, 02_AugFY10 etc and I am able to remove it  in format field dialog box using dispaly string formula editor. So I am to display columns in specified order. but when I create chart , axis labels display column name with sort order. Is there a way I can remove sort order from column names while displaye in the chart and the legend entry box.
    Help on it is highly appreciated.
    Fizza

    Carl answered this one already

  • Adding a dummy column for text in crosstab report

    I created a report using crosstab to show trended months per column & details per row.  Now I'm trying to add additional columns to the crosstab report to display other pertinent info (not calculations, just text pulling from the database).  I read from various threads in the forum that I can create dummy columns to accomodate this, but I don't know how to do so.  Can someone please guide me in doing so?  If creating dummy columns is not a solution, please advice on what's the best way to add text columns to a crosstab report.  Any help is truly appreciated.  Thank you.
    Original report:
    Emp Name     Jan     Feb     Mar     Apr     May     Total
    Doe, John     20     17      30       28     33       128
    Wish to accomplish:
    Emp Name     Emp#     Dept#     Yrs Employed     Jan     Feb     Mar     Apr     May     Total
    Doe, John   12345     6010          8             20     17      30       28     33       128

    Hi Fione,
    I don't have access to CR at the moment but this is how I can think of doing this:
    1) Create a Subreport that points to the same table as the Main Report
    2) The Subreport should return the same number of Employees and in the same order as the Main Report - you can do this by creating a group on the Emp field just like the 'Row' in the Crosstab
    3) Create separate array variables - one each for Emp#, Dep# etc that accumulates values for each employee and inserts it against an index of the array
    4) Suppress all sections inside this subreport and place this Subreport on the Report Header of the Main Report
    5) Reduce the size of this subreport so that it isn't bigger than a dot and DO NOT suppress the section that holds this subreport
    6) Insert Calculated Members in the Crosstab for each column you need
    7) Use the array variable meant for the respective column. You just need to print the value at each index of the array based on the 'currentrowindex+1' function.
    -Abhilash

  • How to sort on Multiple columns in WebI report

    Hi
             I am working in BO XI R2. I have a report containing two columns in a section. Section is on Fiscal Year- Fiscal year includes calendar year 2010 and 2011.
    data for fiscal year 2010 is from october onwards.
    The two columns in the section are
    column 1- calendar  Year
    column 2- calendar Month
    I want to display results as follows
    2010 oct
    2010 nov
    2010 dec
    2011 jan
    2011 feb and so on.
    I first sorted calendar year column so that it shows
    2010
    2011
    but when i try to sort calendar month, for 2010 I am able to display oct, nov, dec in a ascending order but for 2011 the months are displayed randomly. Business user wants to see them in ascending order from Jan to June.
    Please let me know how to get this functionality in the report.
    Thanks in advance.

    Hello Gurus,
    I have same issue with me I am working on XI3.1 and I want to apply Sort on multiple columns on Single block.
    So as you can see the "Org Name" is decending Order and " Emails Sent" total is 63 and   "BCB" have 18 total.
    How would I apply sorting based on email sent from high number to low number. Please help.
    Thank you.
    Adil
    Org Name
    Org Tax ID
    Org ID
    Email
    Emails Sent
    Undelivered Emails
    Well Shot
    11111111
    22222222
    [email protected]
    32
    0
    11111111
    22222222
    [email protected]
    12
    0
    11111111
    22222222
    [email protected]
    10
    0
    11111111
    22222222
    [email protected]
    9
    0
    Well Shot
    Subtotal:
    63
    0
    Org Name
    Org Tax ID
    Org ID
    Email
    Emails Sent
    Undelivered Emails
    Well Play
    444444444
    33333333
    [email protected]
    1
    0
    WellPoint KY Test Org - Central
    Subtotal:
    1
    0
    Org Name
    Org Tax ID
    Org ID
    Email
    Emails Sent
    Undelivered Emails
    BCB
    55555555
    99999999
    [email protected]
    8
    0
    55555555
    99999999
    [email protected]
    8
    0
    55555555
    99999999
    [email protected]
    2
    0
    BCB
    Subtotal:
    18
    0
    Org Name
    Org Tax ID
    Org ID
    Email
    Emails Sent
    Undelivered Emails
    Ghazi, Foundation
    77777777
    8888888
    [email protected]
    1
    0
    77777777
    8888888
    [email protected]
    1
    0
    77777777
    8888888
    [email protected]
    1
    0
    77777777
    8888888
    [email protected]
    1
    0
    77777777
    8888888
    [email protected]
    1
    0
    Ghazi, Foundation
    Subtotal:
    5
    0
    Availity Orgnaization Name
    Org Tax ID
    Org ID
    Email
    Number of Emails Sent
    Undelivered Emails
    Ghazi, Foundations
    66666666
    1234567893
    [email protected]
    1
    0
    66666666
    1234567893
    [email protected]
    1
    0
    Ghazi,  Foundations
    Subtotal:
    2
    0
    Totals:
    89
    0

  • Sorting the column of VARCHAR in report

    Hi,
    I want to sort the column in report with the following scenario,
    I have a column name with PERIOD as VarChar with values APR-11,FEB-11,JAN-11,JUN-11,MAR-11,MAY-11 in a report
    As you can see, It is sorting in Alphabetic order but I need to arrange in JAN-11,FEB-11,MAR-11,APR-11,MAY-11,JUN-11
    So can anyone has a good work around solution?
    regards
    Vj

    Here is your challenge. How do you get Jan-12 to come after Dec-11? Adil's solution is partial. It works only for the current year. Once you cross over to the next year, it stops working because you are only sorting the month. You must include the year to make the solution complete. So here is a solution that always works. It involves some math so I'll explain the math first.
    Let's look at your values:
    Jan-11
    Feb-11
    Dec-11
    Jan-12
    If you convert each month to a number (i.e., Jan = 1, Feb =2... etc.) and then multiply the year by 1000 and finally add them together, we get this:
    Jan-11 1 --> 11001
    Feb-11 2 --> 11002
    Dec-11 12 --> 11012
    Jan-12 1 --> 12001
    You get the picture. The last column will be in the order you seek because the integer will always be greater than the previous month-year even at the transition from December to January. BTW, I multiplied the two digit year by 1000 to ensure that there would be no overlap.
    Now you can sort by this third column. Here is the code that does this:
    CAST(CASE WHEN LEFT(Table.PERIOD, 3) = 'Jan' THEN '1' WHEN LEFT(Table.PERIOD, 3) = 'Feb' THEN '2' WHEN LEFT(Table.PERIOD, 3) = 'Mar' THEN '3' WHEN LEFT(Table.PERIOD, 3) = 'Apr' THEN '4' WHEN LEFT(Table.PERIOD, 3) = 'May' THEN '5' WHEN LEFT(Table.PERIOD, 3) = 'Jun' THEN '6' WHEN LEFT(Table.PERIOD, 3) = 'Jul' THEN '7' WHEN LEFT(Table.PERIOD, 3) = 'Aug' THEN '8' WHEN LEFT(Table.PERIOD, 3) = 'Sep' THEN '9' WHEN LEFT(Table.PERIOD, 3) = 'Oct' THEN '10' WHEN LEFT(Table.PERIOD, 3) = 'Nov' THEN '11' WHEN LEFT(Table.PERIOD, 3) = 'Dec' THEN '12' END AS INTEGER)+CAST(RIGHT(Table.PERIOD, 2) AS INTEGER)*1000
    This solves your problem now even when the month-year crosses to the next year. There you go!

  • 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

  • Crystal Repts XI - Adding labels to summary fields in crosstab report

    I have a crosstab report where
    Columns
    first-level are priority or non-priority schools
    second-level are priority type
    Rows
    First-level: month
    second-level: count of calls opened this month; sum of time spent; opened prior to reportstart and still open, closed this month
    The row label for sum of time spent specifies that the time is in hours.  However, our Curriculum and Instruction department wants each data cell in that row to include the abbreviation hrs.  In other words, the row label would say Time spent on requests closed this month(hrs) and each cell would say 10.5 hrs  2 hrs, etc.  Can anyone help with this?

    Thank you!  This solved my problem.  It took me awhile to find where I could change the currency sign to display on the right but once I did it worked like a charm (we're and educational system, we rarely get to report on money).
    For others who don't know where to find this:
    - right click the field and select Format Field
    - on the Number tab of the format editor, select Display Currency Symbol
    - click Customize
    - click the Currency Symbol tab of the Custom Style Editor
    - in the Position menu choose the selection with the currency symbol on the right
    - in the Currency Symbol box type hrs.
    Save, save, and done!

Maybe you are looking for

  • Adobe reader 9.0 + Adobe Acrobat 5.0 on Internet explorer 7.0 ?

    Hello! I possess Adobe Acrobat 5.0 to create some PDF documents I possess Adobe Reader 9.0 to read some PDF The 2 programs operate WindowsXP SP3 well. I don't manage to open a PDF file with Internet Explorer 7.0 = he looks for has open Acrobat instea

  • Problem with Scrollbar skinning

    Hello guys... I'm witnessing a weird behaviour in my application and I thought I should get your opinions on the matter. I've created two scrollbar skins in Flash Catalyst (one horizontal, one vertical). Its working great when I test the application

  • HTMLB custom cell renderer error

    Greetings- I have created an I-View based on the JSP dyn page that uses the HTMLB tableView.  One of the columns calls a cell renderer class. This I-View works perfectly on my "local" portal, which is the eval version of EP6 SP4.  However, when I upl

  • Change http response code

    how can i change http response code? pls

  • InDesign CS5 crashes when clicking on Edit menu or context menu

    I had this infuriating problem with InDesign CS4, found a few references to others having the same issue, but never any real solutions.  This problem seems to in InDesign CS5 as well. With a document open, if I click the Edit menu or right-click anyw