Chart X Axis Monthly Dates

I am using Crystal Reports XI R2 and am having problems with setting up a chart that contains up to one year's worth of daily data, with potentially missing days.  The chart needs to have a label once per month.
When the X axis is set up as a date, Crystal only shows 5 labels, roughly once every 2-3 months.
When set up as a string, it shows every single day which ends up looking like a black line.
Bringing in data only once per month is not an option as the chart needs to represent fluctuation throughout each month.
I saw on these forums a method that involved creating a formula field that returns a value only when I want (such as the first of the month) and a blank string on every other time, but for some reason that won't work either.  The chart misses several months in a seemingly random fashion even though the data is good (it displays only Jan, April, May, Sept and Oct, all in their correct positions).
So basically I need a label for every month of daily data but can't seem to get Crystal to cooperate.
Any help would be appreciated.

Hi,
The answer given for the pivot chart view applies to this one also..The following is the answer
You can retain both the datetime and time field so that your group by date option doesnt get effected.
When it comes to display..To have only time value in the X axis heading as well as Scale labels. Please follow the following steps.
1. Heading: Pivot table View : Axis titles and labels : Change the title
2. Scale Labels: Pivot table View : Axis titles and labels : Labels : Format : Truncate : 6.
By Truncating the labels. You may get two dots in the end of each label. But hope this may help you.
Regards,
Amrutha.

Similar Messages

  • Can we print an array of dates on the chart X-Axis?

    Hi,
    I have a requirement in which I have to print all the dates in the selected date range on the chart axis even though I donu2019t have the data for all the dates in my DB.I did not find any direct solution in Crystal Report Designer (2008, XI) except we can use "time scale" option in axes tab of chart option but this option also does not provide the required behavior completely.
    After implementing this option I get the date range on chart but from the date I have data in the DB and to the date I have the data in the DB.
    For Example, though I have selected the date range from 2nd April to 8th April, dates in the chart are starting from 5th April since I have the data in the DB of 5th April and 8th April.
    To overcome this limitation of crystal report I thought of creating an array of dates of the selected date range. I can create the array of dates in crystal report but donu2019t know how to use this array in chart to show the summary data.
    I also want to base my Group on this array since I want to show all the dates in group even with count zero.
    Thanks & Regards,
    Amrita

    Hi Sourashree,
    I am using the following formula to create an array of dates.
    numbervar dateDiff:={?eDate}-{?bDate};
    dateTimeVar array dateArray;
    numbervar i;
    for i :=1  to  7 do
        redim preserve dateArray<i>;
    if(i=1) then
        dateArray<i>:={?bDate}
    else
        dateArray<i>:={?bDate}+i;
    This formula is a print time formula since when I specify "WhileReadingRecords" array remains blank (I have confirmed this by returning any single value from the array).
    I can not base my Group and Chart on any Print Time formula since these two get calculates at read time.
    Can you please let me know if there is any other way of creating the array at read time? Or should I create the array in main report and then pass it to sub report?
    Regards,
    Amrita

  • Format  Dates in Chart to List Months not Days?

    I have a CF Report that I has a Subform Chart with the
    following SQL:
    SELECT ticketDate, Count(tickets.ticketDate) as CountTickets
    FROM tickets
    WHERE (ticketType LIKE 'TS%')
    GROUP BY ticketDate;
    On my Line Chart, I have the Dates going across the bottom
    from L to R.
    How do adjust my SQL above so it combines the Dates to list
    in months instead of each day?
    And format them to Jan-07, Feb-07, Mar-07, etc..?
    ps: Here is a link to a sample image of my Report:
    http://cerberus.clearwave.com/jerry/Ticket_Analysis_Sample.gif
    (the SQL listed above is for the Yellow bar only)
    Thanks for the help,
    jlig

    Post Author: Ray Brack
    CA Forum: Charts and Graphs
    In case anyone else comes across this problem:
    1) After making the changes right-click the chart in Analyzer and select "Apply changes to all charts"
    2) Right-click the chart again and select "Save as template"

  • Waveform chart time axis is not matching the waveform data

    So here an interesting conundrum I hope you might be able to help me with...
    My VI has waveform data sent to a chart, though the data is not being plotted against the current time.  Rather, it is being plotted starting way back in the reference time (way back in 1903).  I don't understand why this is happening.  When I build the waveform, I use the "Get Date/Time in Seconds" function outside the while loop and feed that into my "Build Waveform" Function as the t0 value.  My dt value is 0.05 (20 Hz) and then I feed in my array of data in the Y input.  Any ideas why the chart is plotting this data over 100 years ago?  Thanks!
    Andrew

    Hiii, Ronin
          Here is your solution.
    By default, waveform charts and graphs display the absolute time at time 0 as 7:00:00 PM, 12/31/1903 on a Windows based system. Property nodes can be used to get the correct absolute time to display on the x-axis of the waveform chart.
    First, right click the chart on the front panel and select X Scale >> Formatting. Then set the format to Absolute Time.
    Create a property node for the waveform chart by right-clicking on the chart on the block diagram and selecting Create >> Property Node. Expand the property node to display two properties. Select the Format property and the Offset property. The Format property is located under X-Scale >> Format and Precision >> Format, and the Offset property can be found under X-Scale >> Offset and Multiplier >> Offset. Right click on the property node and select Change All to Write.
    For the Format property, the context help shows that there are multiple inputs to this property. Wire in a value of 7 to set the format to Time and Date.For the Offset property, first wire the output of the Get Data/Time in Seconds VI to the input of the To Double Precision Float VI. Then wire the output of the To Double Precision Float VI to the Offset property.
    In addition, if you know the number of data points plotted to the chart per second, you can set the Multiplier property located under X-Scale >> Offset and Multiplier >> Multiplier. If there are x data points generated per second, wire in a value of 1/x to the Multiplier property. A simple example program "Chart with Timestamp" that demonstrates how to do that is attached.
    Thanks,
    Nishant
    Attachments:
    Chart with Timestamp.vi ‏36 KB

  • Pivot Chart X-Axis Values

    Hi
    I generated one report using pivot char. In pivot chart row page i added datetime and time field.
    In my chart x axis should be display time label only. But values should be group by Date.
    How to set x axis time value only in my chart.
    If i removed date from row page the value will be wrong.
    Thanks

    Hi,
    You can retain both the datetime and time field so that your group by date option doesnt get effected.
    When it comes to display..To have only time value in the X axis heading as well as Scale labels. Please follow the following steps.
    1. Heading: Pivot table View : Axis titles and labels : Change the title
    2. Scale Labels: Pivot table View : Axis titles and labels : Labels : Format : Truncate : 6.
    By Truncating the labels. You may get two dots in the end of each label. But hope this may help you.
    Regards,
    Amrutha.

  • Line Chart X Axis Not Sorted Correctly

    I have created a line chart where the x axis is date closed and the y axis is number of days to close. This chart is placed within a group called priority.
    When the chart is created the close dates are not on the x axis in ascending order. I'm expecting it to be 10/1, 10/2, 10/3, etc. but instead I'm getting 10/6, 10/31, 10/28, etc. from left to right.
    I've got the Record Sort set to closed date ascending and if I place the records into the report they sort correctly. It's just the chart that sorts incorrectly.
    What am I missing here?

    Hi Jason,
      here is the steps you should follow in order ro set the sorting for barchart.
    1. go to chart expert
    2. click on data tab
    3. select the field in the selected list of report columns on which you have to sort, then the order button will be enabled
    4. click on the order button
    5 it will open new window by name "chart sort order", where you can set the sorting order(ascending order, descending order, specified order or the original order) for the selected report column.
    I hope this will help you..
    Regards
    Deepa

  • How to get completed  last 3,6,12 months  data in obiee 11g

    Hi,
    My scenario is am having Report A and Report B.
    Report A is a Parent Report and which is having Date Column & Fact Columns.Report B is a Child report of Repot A which is supposed to show the completed last 3 ,6,12 months fact data in chart view.
    eg,
    Suppose value of Date in Report A is 23-Jul-2012 So in Report B i have to show june,april,may months data in chart view(like 6,12 months..).Because july month is not completed.
    How i can achieve this? Kindly help me.
    Thanks,
    Yams

    Approach would be take an itemediate report between A and B. Pass the date value to intermediate report which holds the date from Report A and
    calucate what was the date for 3, 6 , 12 months. Now you get the date and year.
    In the Repor B use FILTER from intermediate filter.
    You can use TIMESTAMPADD or TIMESTAMPDIFF if possible.

  • Stack strip chart x axis

    Hi y'all
    is there a way, besides just putting one strip chart on top of another strip chart and have it aligned just right to hide the x axis and be on the same x scale as the others. For example: Schart #1 represents the pressure in the system, Schart #2 current , Schart #3 voltage.
    Now I could have all these on one strip chart but while acquiring data it is hard to determine one line from another when you have 16 channels scrolling past on the same strip chart.
    What I am looking for is something like the digital graphs where you have multiple views on the same x axis. 
    Is there a way to do this besides stacking strip charts on top of one another?
    Are there any proposed changes coming that would include this?
    Thanks

    As far as I know there is no possiblity to obtain your goal other than stacking more charts one on top of each other. The digital graph is lot more simple as digital signals can have only 0 or 1 value, so it is possible to plot them on the same graph with some y-offset without losing the real meaning of the signal itself. With analog signals this is considerably more complex, as each of them must reference to an analog scale.
    Alternative ways to address your situation are to use the secondary Y-axis to hold some of the plots or to use the legend to permit hiding/showing individual plots to make easy to the user to read the chart.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Cfchart CFmx8 charting points with no data

    We are having a problem with <cfchart> in CF 8. It
    worked fine in CF7.02 with all hotfixes installed. Basically it
    plots points where there is no data. some lines have data for 15
    points and some for maybe only 13 or 14 points. It fills in teh
    missing points with data from the last point that had data.
    Notice the last three lines on this chart. At the end of the
    line--- where the line goes straight across it is charting data
    that doesn't exist.
    http://www.bikersites.com/SL/raceSL/secondsbehind.cfm?RHID=31:1
    This gets to be a real problem when you look at the following
    chart. It gives the races lap times for laps they never completed.
    http://www.bikersites.com/SL/raceSL/laptimes.cfm?RHID=31:1
    Any ideas? Anyone else having this problem?
    This works fine on our development server which had CF7. But
    at hostmysite they have cf8.

    Having same problem here, with CF9.  I have 5 monthly data points for Jan-May 2012.  But CFCHART will extend the LINE in the line chart for the June - December 2012 with all ZEROs.  This only happens when I'm plotting multiple series, for example if I add a CFCHARTSERIES for all 12 months in 2011. 
    If I remove 2011, CFCHART only displays the 5 monthly data points for 2012.  I'm using two CFQUERIES (Q of Q), one with 12 monthly data points for 2011, and one with 5 data points for 2012 year-to-date.  Individually (with 1 CFCHARTSERIES) they plot fine.  But when you have TWO CFCHARTSERIES, the 2012 extends the 2012 line with all ZEROs for June-Dec 2012.  So you don't get a good year-over-year chart, and I need one that scales, since all the values are between 90% and 100%.  Thanks for any help/advice.
    Gary

  • Waveform chart X-Axis reverses itself when upper limit is edited in Absolute Time - problem may be linked to Timestamp Control?

    I've seen this problem for some time now, and it still exists in the Silver toolset Waveform Chart in LV 2012.  If the chart is in strip mode, and you edit the upper limit value to a point in the future, the X-Axis will invert (higher values/ later time to the left), to the limit of the Chart History length.  This happens whether the chart is active (logging data on a compiled executable) or even when in design mode, though it's more consistent when there's data in the chart.  It's not history length related as far as I can tell, as I set the length to 7 days of sampling @ 1-second intervals (605K), and it happens when I try to set the end time to an hour in the future with only a few minutes of data collected - suddenly the right Absolute Time becomes the time my last sample point was collected, while the left Absolute Time becomes nearly 7 days in the future (so neither end point is what I was setting it to).
    It's nice that the chart gives the option of editing the limits, but as such, it's important that they work as you would expect them to.
    Also - until this is addressed, is there a way to lock it against editing?  Until a fix is made, my workaround is to put a transparent button over the range start & end points, and a transparent flat rectangle above all other mid-range points, and pop-up a data entry form with a Timestamp control to allow editing.  Unfortunately, this doesn't work as I would expect, as typing "11 AM" in the Timestamp control over a prior value of say "10:05:34.232 AM" ends up becoming "11:05:34.232 AM" instead.  ???  Another error - or is this by design?  If it's by design, is there an option to make it behave as I would prefer (11 AM = 11:00:00.000 AM), as Excel behaves with timestamps?  I can't help but suspect this may be linked to the chart axis issue.
    Also - I just built a simplified chart modeled somewhat on my current project, and could not get this to recur.  BUT... had the strangest thing happen:  My sample data was generated using the Trig functions for Sine and Cosine, and at one point my waveforms distorted on the display, so I'm attaching that here plus the simplified chart project.
    Last - my system is LV 2012 on Win7 Pro-x64.
    Thanks!
    Erik
    Attachments:
    Chart data distorted.png ‏45 KB
    Waveform Chart Flaw.zip ‏17 KB

    I am not so sure that this is a bug, and I have not been able to reproduce this behavior that you are describing. 
    But you can lock it from editing by right-clicking on the graph and go to Properties>>Appearance>>Enabled State --> Disabled
    Also, word of advice for the future: You will get more replies from the community with shorter posts and keeping it to one question per post. Summarize what the issue is, and put the detailed documentation and instructions to reproduce in the actual VI. 
    Huntington W
    National Instruments
    Applications Engineer
    ***Don't forget to give Kudos and Accepted as Solution where it is deserved***

  • Issue with Past Month data in the Select Statement

    Hi,
    I written the following query,
    SELECT   /*+NO_MERGE(A)*/
                CASE
                   WHEN snap_shot_date > a.q3
                   AND snap_shot_date <= a.q4
                      THEN q4char
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN q3char
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN q2char
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN q1char              
                END snap_shot_date,
                CASE
                   WHEN snap_shot_date > a.q3 AND snap_shot_date <= a.q4
                      THEN 1
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN 2
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN 3
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN 4
                END sort_by,
                pillar3_exposure_class_code, pd_band_description,
                ROUND (SUM (p3.ead_post_sec_post_crm)),
                ROUND (SUM (notional_principle)),
                DECODE (SUM (notional_principle),
                        0, 0,
                        ROUND (  SUM (DECODE (exposure_type,
                                              'UNDRAW', ead_post_sec_post_crm,
                                              0
                               / SUM (notional_principle),
                               4
                DECODE (SUM (p3.ead_post_sec_post_crm),
                        0, 0,
                        ROUND (  SUM (pd_value * p3.ead_post_sec_post_crm)
                               / SUM (p3.ead_post_sec_post_crm),
                               2
                DECODE (SUM (p3.ead_post_sec_post_crm),
                        0, 0,
                        ROUND (SUM (rwa) / SUM (p3.ead_post_sec_post_crm), 4)
                DECODE (SUM (p3.ead_post_sec_post_crm),
                        0, 0,
                        ROUND (  SUM (lgd_rate * p3.ead_post_sec_post_crm)
                               / SUM (p3.ead_post_sec_post_crm),
                               2
                TO_CHAR (MAX (a.max_date), 'FMMonth DD, YYYY')
           FROM summary.pillar3 p3,
                (SELECT DISTINCT (month_end_date) max_date,
                                 LAST_DAY (month_end_date) q4,
                                 TO_CHAR (LAST_DAY (month_end_date),
                                          'MON YYYY'
                                         ) q4char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -3) q3,
                                 TO_CHAR
                                    (ADD_MONTHS (LAST_DAY (month_end_date), -3),
                                     'MON YYYY'
                                    ) q3char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -6) q2,
                                 TO_CHAR
                                    (ADD_MONTHS (LAST_DAY (month_end_date), -6),
                                     'MON YYYY'
                                    ) q2char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -9) q1,
                                 TO_CHAR
                                    (ADD_MONTHS (LAST_DAY (month_end_date), -9),
                                     'MON YYYY'
                                    ) q1char,
                                 ADD_MONTHS (LAST_DAY (month_end_date), -12) q0
                            FROM rcdwstg.stg_bcar_detail) a
          WHERE snap_shot_date BETWEEN ADD_MONTHS (a.max_date, -12) AND a.max_date
       GROUP BY CASE
                   WHEN snap_shot_date > a.q3 AND snap_shot_date <= a.q4
                      THEN q4char
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN q3char
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN q2char
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN q1char
                END,
                CASE
                   WHEN snap_shot_date > a.q3 AND snap_shot_date <= a.q4
                      THEN 1
                   WHEN snap_shot_date > a.q2 AND snap_shot_date <= a.q3
                      THEN 2
                   WHEN snap_shot_date > a.q1 AND snap_shot_date <= a.q2
                      THEN 3
                   WHEN snap_shot_date > a.q0 AND snap_shot_date <= a.q1
                      THEN 4
                END,
                pillar3_exposure_class_code,
                pd_band_description
       ORDER BY 2 DESC;I have written the query to get the latest 12 months data from a table and split that into 4 quarter to show in the Cognos Report. But when the table having 13th or the past months data, the select statement is showing Empty values in the first two columns and fetching the 13 month data too.
    Can anyone help me in this to avoid the problem.
    Thanks
    Radha K

    WHERE snap_shot_date BETWEEN ADD_MONTHS(TRUNC(a.max_date, 'MM'), -11) AND  a.max_date
    ....

  • Is it possible to post the Excise invoice previous month date.

    Dear All,
    We want to post a excise invoice with previous month date. Is that possible?
    We have created a billing document (VF01) last month (October) and not created Excise Invoice (J1IIN).
    Now our finance people requirement is to create the excise invoice with last month date.
    Kindly let me know whether it is possible.
    Regards,
    Mullairaja

    Yes quite possible provided your FI period is still open.  Once you execute J1IIN and clicked the tab "Billing", you can see a field Posting Date where you maintain the billing document date itself if FI period is open.
    But from excise point of view, this is wrong due to the fact that excise returns should be submitted on or before 3rd of every month in which case, the excise team would have submitted the returns for October.
    thanks
    G. Lakshmipathi

  • Need a formula for 12 months data, 6 months data and 3 month

    Hi All Crystal Experts,
    In my report, data is grouped by months and I have monthly view of data. I have three prompts- Year, Startdate and Enddate. If I give 2013 as year, 1/1/2013 as start date and 05/01/2013 as end date then report shows monthly view of data for Jan-13, feb-13, Mar13, Apr-13 and May-13. Now in report, for each month, I want three additional columns, I want to show last 12month, 6 month and 3 months view. Like for Jan-13 month, in column 6 months, I want to show data for last 5 months including current month i.e. Jan-13+Dec-12+Nov-12+Oct-12+Sep-12+Aug-12 and in Column 12months view, I want to show accumulated data of last 11 months(+ current month) and in 3 months view, data for last 2 months(+ current month).
    I had tried creating Sub report for 12 months view and created Running total formula  but it is not showing any value in report. It is blank. I have created running total like this way:
    (1) "Running total formula" (which I am using and placing on group footer):
    (I) Field to summarize- @Cash_total
    (ii) Evaluate (use a formula):
    WhilePrintingRecords;
    NumberVar Cash_total_12 months;
    If Month ({@Month_PostDate}) In [(Month {?StartPostDate} - 11) to Month
    {?StartPostDate}] Then
       Cash_total_12 months :=  Cash_total_12 months + {@Cash_Total};
    (iii) Reset (use a formula):
    WhilePrintingRecords;
    NumberVar Cash_total_12 months=0;
    When I placed this formula in group footer, it is showing nothing.
    Please suggest me formula. Quick help would be much appreciated.
    Thanks,

    Hi Remi,
    Please do not post multiple threads for the same issue.
    Continue discussion on this thread:
    How to calculate last 12 months, 6 months, 3 months data in report
    -Abhilash

  • How to show a report for 'Previous Month' Data

    Hi Gurus,
    I have a requirement, where i have to default my report to show previous month data.
    Scenario:
    My prompts by Default are set to CURRENT (current year,quarter,month). once the user logs in, the report should display data for month 'Nov' instead of 'Dec'.
    I tried using TIMESTAMPADD() in the formula , but it didn't work, though i don't see any error. Not sure if i 'm missing something.
    Is there a way to achieve this.I 'm using OBIEE 11.1.1.6.
    Any help is highly Appreciated ! Please.
    Thanks,
    Ramya

    From what you wrote I am assuming the user can manually save the report results to the Excel file.
    If your report uses ALV Grid it is possible to export the data to a spreadsheet (one of the functions available in the ALV tool bar).
    If you have used WRITE statements it is also possible to save the output as a spreadsheet (menu System -> List -> Save), but the latter will not produce as nice a spreadsheet if the data don't form a matrix. In other words, some work may be necessary in the spreadsheet afterwards before it has the format your user wants.

  • Calendar month dates in horizontal line

    Is there anyway to show calendar month dates in horizontal line?
    First line will have dates and then second line will have day i.e Sat, Sun, Mon.......
    1 2 3 4 5 6 7 8 9 ........31

    orion_123 wrote:
    Is there anyway to show calendar month dates in horizontal line?
    First line will have dates and then second line will have day i.e Sat, Sun, Mon.......
    1 2 3 4 5 6 7 8 9 ........31You can do all sorts of things if you put your mind to it... e.g.
    SQL> break on month skip 1
    SQL> set linesize 200
    SQL> set pagesize 2000
    SQL> column month format a20
    SQL> column week format a4
    SQL> with req as (select '&Required_Year_YYYY' as yr from dual)
      2      ,offset as (select case when to_char(trunc(to_date(yr,'YYYY'),'YYYY'),'IW') in ('52','53') then 1 else 0 end as offset from req)
      3  select lpad( Month, 20-(20-length(month))/2 ) month,
      4         '('||week||')' as week, "Mo", "Tu", "We", "Th", "Fr", "Sa", "Su"
      5  from (
      6    select to_char(dt,'fmMonth YYYY') month,
      7    case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
      8         when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
      9         when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
    10         else to_char(to_number(to_char(dt,'iw'))+offset) end as week,
    11    max(decode(to_char(dt,'d'),'1',lpad(to_char(dt,'fmdd'),2))) "Mo",
    12    max(decode(to_char(dt,'d'),'2',lpad(to_char(dt,'fmdd'),2))) "Tu",
    13    max(decode(to_char(dt,'d'),'3',lpad(to_char(dt,'fmdd'),2))) "We",
    14    max(decode(to_char(dt,'d'),'4',lpad(to_char(dt,'fmdd'),2))) "Th",
    15    max(decode(to_char(dt,'d'),'5',lpad(to_char(dt,'fmdd'),2))) "Fr",
    16    max(decode(to_char(dt,'d'),'6',lpad(to_char(dt,'fmdd'),2))) "Sa",
    17    max(decode(to_char(dt,'d'),'7',lpad(to_char(dt,'fmdd'),2))) "Su"
    18    from ( select trunc(to_date(req.yr,'YYYY'),'y')-1+rownum dt
    19           from all_objects, req
    20           where rownum <= add_months(trunc(to_date(req.yr,'YYYY'),'y'),12) - trunc(to_date(req.yr,'YYYY'),'y') )
    21        ,offset
    22    group by to_char(dt,'fmMonth YYYY'),     case when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 0 then '53'
    23                                                  when to_char(dt, 'mm') = '12' and to_char(dt,'iw') = '01' and offset = 1 then '54'
    24                                                  when to_char(dt, 'mm') = '01' and to_char(dt,'iw') in ('52','53') then '1'
    25                                                  else to_char(to_number(to_char(dt,'iw'))+offset) end
    26    ) x
    27  order by to_date( month, 'Month YYYY' ), to_number(x.week)
    28  /
    Enter value for required_year_yyyy: 2012
    old   1: with req as (select '&Required_Year_YYYY' as yr from dual)
    new   1: with req as (select '2012' as yr from dual)
    MONTH                WEEK Mo Tu We Th Fr Sa Su
        January 2012     (1)                     1
                         (2)   2  3  4  5  6  7  8
                         (3)   9 10 11 12 13 14 15
                         (4)  16 17 18 19 20 21 22
                         (5)  23 24 25 26 27 28 29
                         (6)  30 31
       February 2012     (6)         1  2  3  4  5
                         (7)   6  7  8  9 10 11 12
                         (8)  13 14 15 16 17 18 19
                         (9)  20 21 22 23 24 25 26
                         (10) 27 28 29
         March 2012      (10)           1  2  3  4
                         (11)  5  6  7  8  9 10 11
                         (12) 12 13 14 15 16 17 18
                         (13) 19 20 21 22 23 24 25
                         (14) 26 27 28 29 30 31
         April 2012      (14)                    1
                         (15)  2  3  4  5  6  7  8
                         (16)  9 10 11 12 13 14 15
                         (17) 16 17 18 19 20 21 22
                         (18) 23 24 25 26 27 28 29
                         (19) 30
          May 2012       (19)     1  2  3  4  5  6
                         (20)  7  8  9 10 11 12 13
                         (21) 14 15 16 17 18 19 20
                         (22) 21 22 23 24 25 26 27
                         (23) 28 29 30 31
         June 2012       (23)              1  2  3
                         (24)  4  5  6  7  8  9 10
                         (25) 11 12 13 14 15 16 17
                         (26) 18 19 20 21 22 23 24
                         (27) 25 26 27 28 29 30
         July 2012       (27)                    1
                         (28)  2  3  4  5  6  7  8
                         (29)  9 10 11 12 13 14 15
                         (30) 16 17 18 19 20 21 22
                         (31) 23 24 25 26 27 28 29
                         (32) 30 31
        August 2012      (32)        1  2  3  4  5
                         (33)  6  7  8  9 10 11 12
                         (34) 13 14 15 16 17 18 19
                         (35) 20 21 22 23 24 25 26
                         (36) 27 28 29 30 31
       September 2012    (36)                 1  2
                         (37)  3  4  5  6  7  8  9
                         (38) 10 11 12 13 14 15 16
                         (39) 17 18 19 20 21 22 23
                         (40) 24 25 26 27 28 29 30
        October 2012     (41)  1  2  3  4  5  6  7
                         (42)  8  9 10 11 12 13 14
                         (43) 15 16 17 18 19 20 21
                         (44) 22 23 24 25 26 27 28
                         (45) 29 30 31
       November 2012     (45)           1  2  3  4
                         (46)  5  6  7  8  9 10 11
                         (47) 12 13 14 15 16 17 18
                         (48) 19 20 21 22 23 24 25
                         (49) 26 27 28 29 30
       December 2012     (49)                 1  2
                         (50)  3  4  5  6  7  8  9
                         (51) 10 11 12 13 14 15 16
                         (52) 17 18 19 20 21 22 23
                         (53) 24 25 26 27 28 29 30
                         (54) 31
    64 rows selected.
    SQL>That's just an example, but yes, of course you can do it. Oracle provides excellent DATE functionality.

Maybe you are looking for

  • FCP Novice needs help with video quality and FCP 5!!

    Hi, I have a real problme that I cannot seem to fix. I think its because I am doing something really wrong! I have a Sony HC42E MiniDV Camcorder which by default records video in full widescreen. I recorded several tapes this way and have now begun t

  • ICal and Address Book fonts--how do you display them in their own font?

    I tried printing address labels from Mac's Address Book. It was pretty intuitive and straight forward. However, when I was prepping to print, I had the chance to change the fonts. The list of fonts was not presented with each font name in the font it

  • Losing Desktop Items/Documents after shutting down and restarting

    Twice, over the last couple of months after shutting down and restarting my macbook, everything on my desktop gets deleted, and it seems all the settings go back to their original form? Anyone have this problem? Message was edited by: jram1111

  • How to get SD Document Category

    Hello Friends, I am not a functional guy and so am having problem in knowing how SD Document Category is related to a customer. I have details like customer, sales organization, distribution channel, division inco terms etc., I have to create a quote

  • Regarding MRP

    Hi, I have st up MRP for a material with also source list & info records defined. I am doing MD01 & than in MD04 i am converting the planned order to PR. Than PO is done & GR. Now when once again i am consuming than in MD04 its showing me the last PR