Quarter ended

Hi all
I wrote a custom query to generate a tab report and PivotChart in the disco, within a date range. But for some reason any when I enter in the date range January 1, 2006, up to the current date, it gives me values for the quarter, which is not yet complete. How can I show the quarters qhich are made only?

Thank you

Hello

Is the date of your gift a parameter? If this isn't a date parameter you TRUNC (TO_DATE(:present date), 'Q'). If you want just the date system current you need TRUNC (SYSDATE, 'Q').

Rod West

Tags: Business Intelligence

Similar Questions

  • End date of current quarter

    Hi experts,

    My qry below works well with sysdate but when m by the way a date is to launch an error for the current quarter end date...
    select add_months(trunc('20-dec-2012','q'),3) - 1 from dual
    ERROR
    ERROR on line 1:
    ORA-00932: inconsistent data types: expected DATE got the NUMBER
    even after adding the to_date function between trunc and date...
    
    Kindly help
    
    Thnx in advance...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                

    We prove that it does not, even with the good to_date

    Here is my proof it does:

    SQL> select add_months(trunc(to_date('20-DEC-2012', 'DD-MON-YYYY'), 'q'), 3)-1 f
    rom dual;                                                                       
    
    ADD_MONTH
    ---------
    31-DEC-12                                                                       
    

    Version 11.2.0.3, Windows 64-bit

  • With regard to execution of the quarter report

    Hello

    I need to put a filter on the report so that the report runs for the quarter. If I run the report today it must run for the quarter ended.

    Please help me.

    As I said, this SQL will give you the first day of the quarter. You must have another SQL statement that gives you the last day of the previous quarter. Once you have the dates, you can build a "between the filter" on your date to get all the dates in the term field.

    PS I don't mind followed by questions, but please recognize that you already have with 'useful' or 'proper' points, in this case "correct." Thank you.

  • Load = nearly black screen?

    I came home from class today (I'm a freshman college) and turned on my g6 Pavilion computer to check my e-mail. My battery was at 15%, so I decided to plug in the charger. It was fine in the beginning, I scoured Facebook for about five minutes, but my parents came home shortly after and I wanted to help with groceries. I close my laptop for about ten minutes, and when I turned it back on, I noticed the screen was a bit dark, it is sometimes the first awakening, but after the screen came back to life, she began very suddenly and smoothly from going dark. Very dark. It is about 10% of its normal brightness. I can still see everything, but it is very very dark.

    I knew something was strange, and generally seeing her Gets a little dimmer when it is unplugged, I disconnected to see if she was going to die, being a battery problem. To my surprise, he got more light! and not just a bit clearer, it brilliantly as I remember put!

    I checked the settings, thinking I had accidentally set incredibly low brightness when charging, but everything was the same, with the brightness set to a little higher than mi for the plugged in and unplugged parameters.

    I don't know what is happening. I searched online for the answer, but found nothing too useful. Only, I bought this computer at the beginning of the last quarter, end of September.

    I took good care of this laptop, unlike my last, my last laptop was dropped twice and he never acted funny. I gave it to my parents after owning it for four years.

    Help, please. It is a strange situation.

    Have you tried to stop completely and perform a restart?

    Try a hard reset. Disconnect all external devices first.

    battery and power cord 1 / removal

    2 - Press the power button for 30 seconds

    3 reinstall only the power cord for the first start.

    4. turn on

  • Support for Linux in Smartphones blackBerry - marketing Dept.

    Sale of RIM rose by 102% to $1.88 billion for the quarter ending March 1 08. What are the chances of RIM having sufficient funds or will support, customers using Linux? A community which grew to 1.37% in September 2007 to 2.09% in October 2008.

    PS Ubuntu Linux: 8 million users and more

    It is not really answering your question to the Marketing Department, I don't even know if they read this forum. They could.

    Have you looked here for Linux support?

    http://www.BlackBerryForums.com/Linux-users-corner/

  • Function of FDMEE exercises against the adaptation period

    We have 16 periods in merger... 12 times over a period of adaptation for the end of the quarter. So another words, July/August/September is the first quarter (beginning of the fiscal year of July)... makes 1 adaptation period in Fusion that is added to the period of September. Periods of adjustment end quarter 4 are added to the end of quarter month when we load into the planning. Planning will have still only 12 periods. That said, how the drill-through to transactional details will handle it when a drill of user in one of the end-quarter adjustment periods?

    Hello

    In FDMEE, you map periods of 4 adjustment in each month of the quarter end, so for example period Adj1 > Sep

    Therefore:

    -Data of Adj1 will be loaded into Ms

    -Data of Ms are loaded in Ms

    HP, at Pierce Ms you will see in a FDMEE extracting landing page all lines that have been loaded into Ms. These lines will include data from source periods Adj1 and seven. In the FDMEE launch page, there are columns for the period and you can also see the name of the rule to load data.

    Then you can continue with the drill - through EBS by select the amount you want to drill.

    Hope that helps.

  • Help based on the date

    Hi Experts,

    I have a doubt in one tables column is varchar which stores the year and month.
    for example
    '201211' is stored in the column it is in say 2012 is the year and 11 is the months of the year.

    Someone can help me to get the start and end date, start date of the quarter end, start and end date of the year, start date and end of the previous quarter, date of beginning and end of the year previous w.r.t. the exercise...

    Thnx in advance.
  • How to get the fiscal years

    Hi Experts,

    My query below is beginning of quarter end and previous quarter start and end dates according to the calendar year... Now, I have to get the values accordingly exercise...

    Thanks in advance for the support...
    SELECT   MIN (t)"CURNT_QTR_ST_DT", MAX (LAST_DAY (t))"CURNT_QTR_END_DT", ADD_MONTHS(MIN (t),-3)"PREV_QTR_ST_DT", ADD_MONTHS(MAX (LAST_DAY (t)),-3) "PREV_QTR_END_DT" INTO V_CURRQTD_STRT ,V_CURRQTD_END,V_PRVQTD_STRT, V_PRVQTD_END
    FROM (SELECT ADD_MONTHS (TRUNC(TO_DATE(TO_DATE(V_RPRT_DATE)), 'YYYY'), LEVEL - 1)  t,
          TO_CHAR (ADD_MONTHS (TRUNC(TO_DATE(TO_DATE(V_RPRT_DATE)), 'YYYY'), LEVEL - 1), 'Q')QTD
          FROM DUAL
           CONNECT BY LEVEL <= 12) A
           WHERE A.QTD  = V_QUARTER_NUMBER;

    Hello

    You don't need the double table much in PL/SQL.

    Another thing that makes PL/SQL, SQL different programming, it's that, in SQL, you can assign an alias for a column, but you can only refer to this alias in a Super application (or in an ORDER BY clause). In PL/SQL, you can reference a variable once it is set.

    In PL/SQL, once you have a DATE deadline in t, you can set the 4 variables like this:

    v_currqtd_strt := TRUNC (t, 'Q');
    v_currqtd_end  := ADD_MONTHS (v_currqtd_start, 3) - 1;
    v_prvqtd_strt  := ADD_MONTHS (v_currqtd_start, -3);
    v_prvqtd_end   := v_currqtd_start - 1;
    

    Use SELECT... IN PL/SQL when the data in a table, and you must copy these data in variables. (It seemed that you forgot the INTO clause in your last post).
    However, in this case, no data in a table you need to copy, it is not necessary for a SELECT statement.

  • Reg: Quarterly balance sheet

    Hi all

    I need to prepare a report on the quarterly (the quarter end vs for the previous year).

    So I took the rest of the formula for the end of the previous year and the current quarter:

    End of the previous year: TIMESTAMPADD (SQL_TSI_DAY-1, TIMESTAMPADD (SQL_TSI_DAY, EXTRACT (DAY_OF_YEAR time.)) ("' Tax Date") *-(1) + 1, hour. (("" Tax Date "))

    During the quarter: -.
    FILTER ("made - GL balance". "" Amount balance Global1 ' aid (both. (({"" Fiscal Quarter "='@{var_qtr}{2011 Q 1}'))

    And I used the following columns:-Ledger name, accounting code, during the quarter, the end of the previous year, amount of balance Global1.

    May I know what the right way to do it at the level of the report. Please suggest me is possible to do the same thing to the RPD is level

    Thanks in advance.

    Your approach is correct and you can push up to RPD level as well... until you do not prompt values to functions... and always desired current pass current year quarter and the end of the previous year that is for today's report that it will be the end of the year 2010.

  • Union question

    Hello


    I created for the quarter, month, week one day invite here.
    SQL are

    the SQL code:

    SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "ANOTHER"quarter"to the END"Dashboard ".
    UNION
    SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "OTHER"current month"end"Dashboard ".
    UNION
    SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "ELSE 'Current week' the end 'Dashboard '.
    UNION
    SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" The activity ID ' ELSE 'Day' to the END 'Dashboard '.


    I get the error here.

    Error codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error occurred. [nQSError: 59019] All the input stream for the Union operator should have the same number of columns and the Union compatible data types. (HY000)
    Publ. SQL: {call NQSGetQueryColumnInfo ("SELECT CASE WHEN 1 = 0 THEN TMP_VAC." Activity ID"OTHER"current quarter"end 'FTOPTY dashboard' UNION SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "OTHER"current month"the end 'FTOPTY dashboard' UNION SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "ANOTHER"week"to the END 'FTOPTY dashboard' UNION SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "ANOTHER 'day', MV_IW_EMP_HIERARCHY. (» Nom responsable"DELEDE"Tableau de bord FTOPTY» ')}
    Issued SQL: SELECT BOX WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "ANOTHER"quarter"to the END 'FTOPTY dashboard' UNION SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "OTHER"current month"the end 'FTOPTY dashboard' UNION SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "ELSE"Current week"the end 'FTOPTY dashboard' UNION SELECT CASE WHEN 1 = 0 THEN TMP_VAC. "" Activity ID "ELSE 'Day', MV_IW_EMP_HIERARCHY. "" Manager name "of the"FTOPTY dashboard.

    Hi user,

    Replace the TMP_VAC. "Activity ID with a column of type char var

    Thank you
    Saichand.v

  • How to call SQL in the filter condition

    Hello

    Booking dashboard report, I need filter order_date between this quarter beginning date and this date of end of quarter.
    I customized data are available from quarter to quarter end date.
    How do I use the filter.

    Thank you

    Looks like you need filter the date of the order between the start of quarter and the ending quarter by ensuring that order dates is always present between the quarter start date and the date of end of quarter

    Create a report of sub with a column of order date and order date is invited.

    So now, in the report main use filter option advanced and

    Take the quarter start date column and use the advanced on this filter option. Use the results to filter based on another request. You can specify the quarter start date is greater than the date of the selected order (order reporting date column)

    and

    Take the quarter end date column and use the advanced on this filter option. Use the results to filter based on another request. You can specify the quarter end date is less than the date of the selected order (order reporting date column)

    In this way, you can force the order date always between the date of beginning of quarter and quarter end date columns

    It may be useful
    Thank you
    Prash

  • end of the quarter on workdays

    Hi all

    This is how to calculate end of the quarter, ignoring the day.
    with 
    
    calendar1 as
    (select * from 
    (select to_date('29.03.2012','DD.MM.YYYY') as arcdate, 0 as dayoff from dual union all
     select to_date('30.03.2012','DD.MM.YYYY') as arcdate, 0 as dayoff from dual union all
     select to_date('31.03.2012','DD.MM.YYYY') as arcdate, 1 as dayoff from dual)
     where dayoff = 0), 
    
    end1 as
    (select TRUNC(ADD_MONTHS(to_date('25.03.2012','DD.MM.YYYY'), +1), 'Q')-1 as end_of_quarter from dual) 
    
    select max(calendar1.arcdate) as end_of_quarter 
    from calendar1, end1 
    where calendar1.arcdate <= end1.end_of_quarter 
    I need to create the list of end_of_quarter for the period "between sysdate LESS than two years and sysdate OVER two years. Please note that dayoff is not only Saturday and Sunday, but it is also a State holiday, etc. In real life table calendar1 is updated by the Central Bank.

    Could you please suggest me any decision?

    This should be the area you're looking for:

    with calendar1 as (select *
                       from   (select to_date('29.03.2012','DD.MM.YYYY') as arcdate, 0 as dayoff from dual union all
                               select to_date('30.03.2012','DD.MM.YYYY') as arcdate, 0 as dayoff from dual union all
                               select to_date('31.03.2012','DD.MM.YYYY') as arcdate, 1 as dayoff from dual)
                       where dayoff = 0),
              end1 as (select TRUNC(ADD_MONTHS(sysdate, (level - 8)*3), 'Q') start_of_quarter,
                              ADD_MONTHS(TRUNC(ADD_MONTHS(sysdate, (level - 8)*3), 'Q'), +3)-1 as end_of_quarter
                       from dual
                       connect by level <= 16)
    select e1.start_of_quarter, nvl(max(c1.arcdate), e1.end_of_quarter) as actual_end_of_quarter
    from   calendar1 c1,
           end1 e1
    where  c1.arcdate(+) between e1.start_of_quarter
                             and e1.end_of_quarter
    group by e1.start_of_quarter, e1.end_of_quarter
    

    NB. as I did not have a value of 4 years of data in the Schedule table, I just joined him--outside if you have all this information in the table, then you can just join her as if you were in front.

  • You need to retrieve quarter on the basis of a single period.

    Hi Experts,

    I under request now, it returns me to the period (from now on) NOV - 14 based on a defined indicator of front end.

    SELECT dcpv.cal_period_name
          FROM apps.fem_dim_attributes_vl dav,
               apps.fem_cal_periods_attr  dcpa,
               apps.fem_cal_periods_vl    dcpv
         WHERE dav.attribute_id = dcpa.attribute_id
           AND dcpa.cal_period_id = dcpv.cal_period_id
           AND dav.attribute_varchar_label = 'CUR_PERIOD_FLAG'
           AND dcpa.dim_attribute_varchar_member = 'Y';
    

    My requirement is, I need to recover month quarter on the basis of this period, as for November-14 quarter is Q4.

    Result would be like:

    14 OCT

    NOV-14

    DEC-14

    Now when the period November-14 is closed and opens on December 14 and then above suite returns DEC-14 and I need all the quarter four months (OCT-14, NOV-14 DEC - 14).

    Once the DEC-14 is closed and JAN - 15 is open, I need quarter a period (JAN-15, 15 - FEB, MAR-15). Kindly inviting you to suggest how to achieve this.

    Try as...

    the quarters as)

    dates of selection add_months (trunc(sysdate,'Year'), level-1)

    TO_CHAR (add_months (trunc(sysdate,'Year'), level-1), 'Q') q

    of the double

    connect by level<>

    )

    Select to_char(dates,'MON-RR') month_yr

    q

    of (to_char (to_date ('FEB - 14', ' MON-RR'), 'Q') select in_date)

    of the double

    ) your_table--> place the SELECT query that gives the result as NOV-14

    neighborhoods

    where q = in_date

    ;

  • Difficulty accessing data by using the function of Ago - the end of the previous month

    Hey,.

    Recently, I met a problem that I can't fix on my own.


    I need to compare my portfolio to the current date / specified with the portfolio for intelligence and for the end of the previous month (the last day of the previous month).

    It looks like this :

    Capture.JPG

    My fact table consists of the list of contracts of loan that is updated daily. The data for the new day are added to the table, which actually resemble a large sandwich of various portfolios.


    To recover the data for the current/specified date and intelligence is not a problem. Current date - the date is read (can 10.08.2014), the day before - I use the Ago function (e.g., 09.08.2014).

    The real problem is getting the data for the last day of the month previous (e.g. 31.07.2014), since I can't put a specific to the function of Ago offset (10 days in our example), as the number of days from the end of the previous month is constantly - changing is a daily report.


    The best solution would be setting the offset function there is a dynamic value, which would change according to the user selects the date of the report. Can be based on the number of days in the month. BI strictly prohibits using anything that is not an integer in the offset value, so this isn't an option.


    I tried a work around using formulas in columns, like: FILTER ('facts of agreements'. "" Outstanding "USING ("Posting Date". "" Id of the day ' = TIMESTAMPADD (SQL_TSI_DAY, TIMESTAMPADD (1), (SQL_TSI_DAY, 'Date of Report'.) "Number of the day in the month" *-(1) + 1, DATE ' @{report_date}'))). "

    It did not work, since the data I receive are dated the last day of the previous month and date, which is applied to get the data for the current date filter / specified, it cuts.


    Tried to create another time the hierarchy, with the ends of period (week, month, quarter, year) and use it as a level at the Ago. He does work in part, offset the end of 1 month, but I can't bind the data, I get to the date of the report, as the Ago function returns random dates.


    I tried to search if people have had the same problems and it seems I'm the only one. I'm really desperate at this point, not even sure it's possible to get the result I need everything.

    So, please advise!


    Aurore

    Finally got sorted! Hoorey!

    Here's how it's done:

    I created a presentation variable 'report_date' for the user to choose the date of the desired report. That this formula has added to the column:

    FILTER ('facts of agreements'. "" Outstanding "USING ("facts of agreements". (("" Days late max "> 30))-there is (FILTER ('facts of agreements'. "" Outstanding "USING ("facts of agreements". ((("" Days late max "> 30)), TIMESTAMPDIFF (SQL_TSI_DAY, TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH (DATE ' @{report_date}') *-1, DATE ' @{report_date}" "), DATE ' @{report_date}'))

    Basically, this formula is used to calculate the difference between the current amount of the portfolio and the amount of portfolio for the last day of the last month (or at the end of last month), where only loans with number of days late over 30 are included.

    In the service there, I used a TIMESTAMPDIFF as a compensation formula to calculate the difference in days between the date of the report and the end of last month. Now no matter what date the user chooses it will give the correct difference in days.

    Really easy, but it took me a little time to get there.

    Hope this helps someone

  • How to complete the data for months current quarter of the last month of the previous quarter

    • Here is the create table and insert the statement how my data is as
      CREATE TABLE SAMPLEDATA (Snapshot_M DATE, Date_Ky DATE, F_Quantities INTEGER)
      INSERT INTO VALUES SAMPLEDATA (SEPTEMBER 1, 2014 ", 1 SEPTEMBER 2014", 14)
      INSERT INTO VALUES SAMPLEDATA (OCTOBER 1, 2014 ", 1 OCTOBER 2014", 13)
      INSERT INTO VALUES SAMPLEDATA (1 NOVEMBER 2014", 1 NOVEMBER 2013', 12)
      INSERT INTO VALUES SAMPLEDATA (DECEMBER 1, 2014", 1 DECEMBER 2013', 11)
      INSERT INTO VALUES SAMPLEDATA (JANUARY 1, 2014 ", 1 JANUARY 2014", 10)
      INSERT INTO VALUES SAMPLEDATA (FEBRUARY 1, 2014 ", 1 FEBRUARY 2014", 90)
      INSERT INTO VALUES SAMPLEDATA (MARCH 1, 2014 ", 1 MARCH 2014", 20)
      INSERT INTO VALUES SAMPLEDATA (APRIL 1, 2014 ", 1 APRIL 2014", 23)
      INSERT INTO VALUES SAMPLEDATA (MAY 1, 2014", 1 MAY 2014', 30)
      INSERT INTO VALUES SAMPLEDATA (JUNE 1, 2014 ", 1 JUNE 2014", 70)
      INSERT INTO VALUES SAMPLEDATA (JULY 1, 2014 ", 1 JULY 2014", 20)
      Desired results set:
      Snapshot_M Date_Ky F_Quantities
      10 1/1/2014-2/1/2014
      10 1/1/2014-3/1/2014
      01/01/2014 41 10/2014
      4/1/2014 5/1/2014 23
      4/1/2014 6/1/2014 23
      4/1/2014 7/1/2014 23

      My requirement is to load the data in the cube.

      So to summarize, data that are loaded onto the month last only a quarter Q1 tax (Jan) should server as a data for the quarter Q2 next month (February, March, April), the data loaded on the last month of Q2 (Apr) will be server as forecast data for Q3 months and so on.

      Thank you in advance.



    with

    SAMPLEDATA as

    (select to_date('09/1/2014','mm/dd/yyyy') snapshot_m, to_date('09/01/2014','mm/dd/yyyy') date_ky, 14 f_quantities of all the double union)

    Select to_date (October 1, 2014 "," mm/dd/yyyy ""), to_date (1 October 2014 "," mm/dd/yyyy"), 13 union double all the

    Select to_date (November 1, 2013 "," mm/dd/yyyy ""), to_date (1 November 2013 "," mm/dd/yyyy"), 12 union double all the

    Select to_date (December 1, 2013 "," mm/dd/yyyy ""), to_date (1 December 2013 "," mm/dd/yyyy"), 11 union double all the

    Select to_date (January 1, 2014 "," mm/dd/yyyy ""), to_date (1 January 2014 "," mm/dd/yyyy"), 10 of all the double union

    Select to_date (February 1, 2014 "," mm/dd/yyyy ""), to_date (1st February 2014 "," mm/dd/yyyy"), 90 union double all the

    Select to_date (March 1, 2014 "," mm/dd/yyyy ""), to_date (1 March 2014 "," mm/dd/yyyy"), 20 union double all the

    Select to_date (April 1, 2014 "," mm/dd/yyyy ""), to_date (1 April 2014 "," mm/dd/yyyy"), 23 union double all the

    Select to_date (May 1, 2014 "," mm/dd/yyyy ""), to_date (1 may 2014 "," mm/dd/yyyy"), 30 union double all the

    Select to_date (June 1, 2014 "," mm/dd/yyyy ""), to_date (1 June 2014 "," mm/dd/yyyy"), 70 union double all the

    Select to_date (July 1, 2014 "," mm/dd/yyyy ""), to_date (1 July 2014 "," mm/dd/yyyy"), 20 union double all the

    Select to_date (August 1, 2014 "," mm/dd/yyyy ""), to_date (1 August 2014 "," mm/dd/yyyy"), 22 of the double

    )

    Select snapshot_m, date_ky, last_value (f_quantities) ignore nulls on f_quantities (order by date_ky)

    of (trunc (add_months (snapshot_m-1), 'q') select snapshot_m, date_ky,)

    -case when trunc (add_months (snapshot_m-1), 'q')! = lag (trunc (add_months(snapshot_m,-1), 'q')) (date_ky order)

    then lag (f_quantities) (date_ky order)

    end f_quantities

    of sampledata

    where date_ky > = date ' 2014-01-01'

    )

    where snapshot_m > = date ' 2014-01-01'

    order of date_ky

    SNAPSHOT_M DATE_KY F_QUANTITIES
    01/01/2014 01/02/2014 10
    01/01/2014 01/03/2014 10
    01/01/2014 01/04/2014 10
    01/04/2014 01/05/2014 23
    01/04/2014 01/06/2014 23
    01/04/2014 01/07/2014 23
    01/07/2014 01/08/2014 20
    01/07/2014 01/09/2014 20
    01/07/2014 01/10/2014 20

    Concerning

    Etbin

Maybe you are looking for