Display the previous month data based on the chosen date

Hi all

I need the report of this requirement:

The user selects an "Invoice Date" with guests, then it should be able to view the data of the previous month until the date (i.e.; If he chooses on 6 July in the hour that I need to view the data of June 6). How can I achieve this?

Thank you
Jerome

Hi timestampadd function used in your filter.

At the command prompt have a variable presentation as invoice_date and your report using the filter as below,

"The date of the invoice" > = timestampadd(sql_tsi_day,-30,'@{invoice_date}')
and "Date of the invoice.<=>

Published by: kart on July 6, 2010 11:24

Tags: Business Intelligence

Similar Questions

  • You want to display the current month and previous month data in a single record on forms?

    Hello experts,

    I have this requirement:

    Table structure:

    Division of months value totalAmount

    01-apr-2013 1 10000

    May 1, 2013 1 20000

    01-apr-2013 2 30000

    May 1, 2013 2 50000

    I want to display in forms such as

    Form:

    Month: May 1, 2013

    Total difference of month Division total division prev_Month

    May 1, 2013 1 10000 April 1, 2013 1 20000 10000

    May 1, 2013 2 30000 April 1, 2013 2 50000 20000

    I use two procedure to fetch the records for the current month and the previous month.

    but it will cause a problem, if for some data division previous month do not arise.

    Please suggest me some query I can get with current and data month pre to unique record.

    Please help me.

    Thank you

    Yoann

    I DON'T KNOW BUT TRY...

    Select the month of x.mn, x.division, total x.totalAmount, y.mn prev_month, y.division, total y.totalAmount, (y.totalAmount - y.totalAmount) difference

    Of

    (select month mn, division, totalAmount value)

    from table_name

    where month = (select max (month)

    from table_name

    )

    ) x,.

    (select month mn, division, totalAmount value)

    from table_name

    where month = (select add_months (max (month),-1))

    from table_name

    )

    ) y

    where x.division = y.division

    /

    ALEXANDER SIMONNET

    DHAKA BANGLADESH

  • 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

  • To display the first and last date of one month

    I have the date format in 10 Mar 10.
    My requirement is when ever I select the date in the dashboard for all the month it should show results of all the months.
    I had the request for obiee101.blogspot.com.but if I use that sometimes it is not the latest results of the day. Any body please give me the query to display the results for the first day and lastday?
    I select any day from the drop-down menu of the guest, it must display the month of ex: if results
    If I select either 1 mar mar 10.2 10,30 mar 10...
    It should give results for the month of March.
    Can you please provide me the query for the last month also?
    If I select March date date print want to display the results of March together in a single column, results of the previous months in the other column

    Someone help me to achieve this?

    Yes, you are right. Jean SQL for the last day of the month, if the "last day of the previous month" ends on June 30, that "adding a month" will result in the 30th of the following month. But if the next month has 31 days, you don't miss this day here.

    Use it for the last day of the current month.

    TIMESTAMPADD (SQL_TSI_DAY-1, TIMESTAMPADD (SQL_TSI_MONTH, 1, TIMESTAMPADD (SQL_TSI_DAY, 1, TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH (CURRENT_DATE) *-1, CURRENT_DATE))))

    The SQL above will ensure that you will get always the last day of the month "current" no matter how many days during the previous or current month.

  • call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. The other rows are based on the entities

    Hi Experts,

    JDeveloper 12.1.3.0.0

    I have a VO based on entity object. With a column of the VO is transient attribute (I created).

    I need to call a stored procedure for each row in the transitional attribute and display the data in the form of af: table. As well as other attributes.

    So can anyone suggest how can I achieve this?

    Thank you

    AR

    I think that you need a stored function (which returns the value) in this case, is not?

    Take a look at:

    https://docs.Oracle.com/CD/B31017_01/Web.1013/b25947/bcadvgen005.htm

    and search for:

    Invoking stored function with only Arguments in

    call your function in the Get attribute and return value accessor...

  • List date values in the current month and previous month next month

    Hello. I am looking for a way to query a list of each value date in the current month, previous month and next month.

    1 DECEMBER 15

    ...

    ...

    31 DECEMBER 15

    1ST JANUARY 16

    ...

    ...

    30 JANUARY 16

    1 FEBRUARY 16

    ...

    ...

    28 FEBRUARY 16

    Any help would be greatly popular!

    with the data (start_date and end_date) as)

    Select Add_months (trunc (sysdate, 'month'),-1),

    Add_months (trunc (sysdate, 'month'), 2)

    of the double

    )

    Select the level - 1 the_date + start_date

    from the data

    connect by level<= end_date="" -="">

  • Compare the amount of the previous month based on the account number

    Hi team,

    In my table of the source, amount aggregated by month for a given account there
    ACCOUNT_NUMBER          YEAR          MONTH          AMOUNT
    ---------------          -------          ------          -----------
    123456789          2012          01          450.00
    123456789          2012          02          -234.00
    123456789          2012          03          0.00
    123456789          2012          04          890.00
    123456789          2012          05          78.00
    123456789          2012          06          44444.00
    123456789          2012          07          450.00
    123456789          2012          08          450.00
    123456789          2012          09          450.00
    123456789          2012          10          120.67
    123456789          2012          11          176.88
    123456789          2012          12          450.00
    123456789          2013          01          340.00
    Now, I need to add a column more in this area, with logic below. There will be more than 1000 accounts available. For each account I need to achieve this.

    CASE WHEN MONTH_AMOUNT = 0 THE CASE OTHERWISE 1-0 WHEN PREVIOUS_MONTH_AMOUNT = 0 THEN 0 1 OTHER)

    On this basis, the objective should be
    ACCOUNT_NUMBER          YEAR          MONTH          AMOUNT          FLAG
    ---------------          -------          ------          -----------     -------------
    123456789          2012          01          450.00          1
    123456789          2012          02          -234.00          1
    123456789          2012          03          0.00          -1
    123456789          2012          04          890.00          1
    123456789          2012          05          78.00          1
    123456789          2012          06          44444.00     1     
    123456789          2012          07          450.00          1
    123456789          2012          08          450.00          1
    123456789          2012          09          450.00          1
    123456789          2012          10          0.00          1
    123456789          2012          11          0.00          0
    123456789          2012          12          450.00          1
    123456789          2013          01          340.00          1
    can someone help me how to compare the value of the previous month. All columns have the data varchar, except for the quantity type.

    Hello

    I have not tried. But this desire.

    SELECT
    ACCOUNT_NUMBER,
    YEAR,
    MONTH,
    AMOUNT,
    CASE WHEN AMOUNT = 0 THE 0 ELSE 1 - CASE WHEN LAG(AMOUNT, 1, 0) OVER (PARTITION BY ACCOUNT_NUMBER ORDER BY YEAR, MONTH) = 0 THEN 0 ELSE 1) AS FLAG
    FROM SOURCE_TABLE;
    

    See you soon
    Didier

    Published by: Didier vishwakarma on 6 March 2013 12:36

  • Extract the first and the last Date of the previous month

    This seems to be a delicate but again it is perhaps easy for some of you people.

    Here is how I find the previous month

    Any ideas on how to get the first and last date of the previous month?

    Thanks in advance.

    Hello!

    SQL>
    SQL> select last_day(add_months(sysdate,-1)) from dual;
    
    LAST_DAY
    --------
    28.02.10
    
    SQL> select trunc(add_months(sysdate,-1),'MM') from dual
    
    TRUNC(AD
    --------
    01.02.10
    
    SQL> 
    

    T

  • How to display the image in the answes table based data.

    I need to display the image based on the values retrieved from the base.

    For example, if the value of a column is 1, then I need to be to display an image within a table. Help, please. Thank you.

    Published by: 853213 on April 18, 2011 21:50

    Hello

    Use the conditional formatting...

    The column properties->->, click Add a Condition for conditional formatting-> filter on the column value is equal to 1-> change Format (click on the image and choose the image)

    If you want to add custom images
    Reference: http://obiee101.blogspot.com/2009/07/obiee-adding-custom-image-in.html

    See you soon,.
    Aravind

  • How to get sales last day of the previous month

    HELO guys

    I have a question how do I get sales date last day of the previous month where my fact table is level. in fact I tried using Ago but it seems not working. for example, if I chose December 29, 2014 so if I used the function there are then the result will display data on November 29, 2014 (not the last day of November 2014).

    Please guys if you have any solution and I really advise thanks to you.

    Not exactly under what circumstances specific as you try to reach this goal, but suppose you have a few guest dashboard where you select a day and you have a report with a measure where you want to show the sales of the last day of the previous month based on the selected date in the dash prompt.

    If you change the formula of this measure to something like:

    FILTER (with the HELP of 'Sales' (DATE = TIMESTAMPADD (SQL_TSI_DAY-1, TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH(@{PV_DATE_SELECTED}) * (-1) + 1, @{PV_DATE_SELECTED}))))

  • How to get the last business day of the previous month?

    Hi all

    We need the user as below,

    If the user select 18 June 2015 ' quick dashboard as the input value, and then they want to see last month last day of work (business date: 29-may-2015) amount in report, if you have an idea please share with us.thanks

    Note:

    use under request we can able to get the last day of the previous month, we want to for the last business day of the last month, based on the date of entry of the user?

    TIMESTAMPADD (SQL_TSI_DAY,-(1), TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH ("DIM_TIME". ("" DataDate ") *-(1) + 1,"DIM_TIME ". (("" DataDate "))

    Thank you

    Deva

    Try this,

    case when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 1 then timestampadd (sql_tsi_day, (Dayofmonth(Date '2015-06-15') *-1)-2, Date '' 2015-06-15) when Dayofweek (timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15')) = 7 then timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1-1, Date '' 2015-06-15) another timestampadd (sql_tsi_day, Dayofmonth(Date '2015-06-15') *-1, Date ' 2015-06-15') end

    As Ftsiot said in this post, it will work only to exclude the sat and Sun. Another one if you want to exclude regional holiday, you may need a calendar in DB table.

    Thank you

    AJ

  • retrieve December as the previous month in 2013

    All,

    I used this code to retrieve the previous and upcoming months last year that worked very well...
    If the date was for example September 7, then a list of the previous months must be shown, and a list of the next months including the current month.
       select  to_char(to_date(level,'mm'),'FMMonth') month
       from  dual
       connect by level < to_number(to_char(sysdate,'mm'))
    
     
    MONTH
    ---------
    January
    February
    March
    April
    May
    June
    July
    August
     
     select  to_char(add_months(sysdate,level - 1),'FMMonth') month
      from  dual
     connect by to_number(to_char(add_months(sysdate,level - 1),'mm')) != 1
     
     
    MONTH
    ---------
    September
    October
    November
    December
    Now we are in January 2013.
    When I run the code for the previous months, there is no line. It is right that there is no previous month again in 2013.

    I would like to extend the code to display December 2012 as the previous month at the beginning of the year.
    How can I achieve this?

    Thank you
    Diana

    Hello

    Try this:

    select
      to_char(trunc(add_months(sysdate, -level) ,'month'),'FMMonth-yyyy') previous_months
    
    from
      dual
    
    connect by
      level <= case when to_number(to_char(sysdate,'mm')) = 1 then 12
                    else to_number(to_char(sysdate,'mm'))-1 end
    
    order by
      add_months(sysdate, - level)
    

    If wew replace sysdate with date ' 2013-01-08' then it results in:

    select
      to_char(trunc(add_months(date '2013-01-08', -level) ,'month'),'FMMonth-yyyy') previous_months
    
    from
      dual
    
    connect by
      level <= case when to_number(to_char(date '2013-01-08','mm')) = 1 then 12
                    else to_number(to_char(date '2013-01-08','mm'))-1 end
    
    order by
      add_months(date '2013-01-08', - level)
    ;
    PREVIOUS_MONTHS
    ---------------
    January-2012
    February-2012
    March-2012
    April-2012
    May-2012
    June-2012
    July-2012
    August-2012
    September-2012
    October-2012
    November-2012
    December-2012   
    
     12 rows selected 
    

    If we replace sysdate with date ' 2013 - 02 - 08, then we get:

    select
      to_char(trunc(add_months(date '2013-02-08', -level) ,'month'),'FMMonth-yyyy') previous_months
    
    from
      dual
    
    connect by
      level <= case when to_number(to_char(date '2013-02-08','mm')) = 1 then 12
                    else to_number(to_char(date '2013-02-08','mm'))-1 end
    
    order by
      add_months(date '2013-02-08', - level)
    ;
    
    PREVIOUS_MONTHS
    ---------------
    January-2013    
    

    Same thing for 2013 - 05-08 "

    select
      to_char(trunc(add_months(date '2013-05-08', -level) ,'month'),'FMMonth-yyyy') previous_months
    
    from
      dual
    
    connect by
      level <= case when to_number(to_char(date '2013-05-08','mm')) = 1 then 12
                    else to_number(to_char(date '2013-05-08','mm'))-1 end
    
    order by
      add_months(date '2013-05-08', - level)
    ;
    
    PREVIOUS_MONTHS
    ---------------
    January-2013
    February-2013
    March-2013
    April-2013      
    

    Kind regards

    Peter

  • How to display the exact DATE of my first access to a Web site?

    I need to see when I first consulted several Internet sites. History does not show it, but maybe I'm missing something.
    I appreciate all help.

    ~ airix

    In history, Firefox only displays the most recent visit to a given URL. To find previous visits, you need a tool that allows you to view old data in the database places.sqlite. These discussions have discussion of a few options:

  • How can I get the data view to display the same amount of time I save?

    I use the Sound and Vibration Measurement Suite.  In the data view, I display a graph of time, the power spectrum, the Color Map and the waterfall.  I am also showing strength in numbers group for several bands and doing cutting-edge research.  I record 100 ms of the transient wave.  In the data view, why the temporal plots show several seconds of data?  What determines how much time will appear in the data view?  More important, the power spectrum reflects the power for the entire of several seconds of data displayed?  Same question for power in the values of band and cutting-edge research.  I want to just this data displayed for 100 ms of the wave that I record.  So, how can I get the data displayed (waveforms) and power numbers come only 100 ms of the recorded wave?

    Finally, what is the best way to make account concisely the recorded data?  By slide numbers on the Documentation tab is not concise, because it comes with graphics, etc..  I tried save as ASCII/LVM, but I get a bunch of stuff intermiated I don't care.  Help?

    Hi TimRsandiego,

    SignalExpress is programmed to display graphs with default scales based on the type of action, it's reading. These scales and settings can be changed by right-clicking on the graph, and then select Properties.

    If you are interested to learn more about how to use SignalExpress, I would recommend checking out some demonstrations/tutorials on NI.com. You can find some of these demos at the following location:

    Let me know if you have any other questions.

    Kind regards

  • Search a directory of data and display the data that is within the range of dates

    Hello

    I have a full idrectory of data from overtime, and I think of search in the directory and display the data files for specific dates. I only started this encoding yet but I figure I'll take the brain of some SMEs here labview and start in the right direction. My goal is to go through a comprehensive directory of data taken for a month or MORE csv files and select the data to process and display office files the date of its registration. If I take the data of last week, last month or last minute, it should just treat as an exact or more.

    Please help me get started on the right foot

    End date will be probably greater than the start date, right? So, end date must connect at the entrance to the upper limit. Then wire in the range? to the conditional terminal of a tunnel of conditional indexation.

    Lynn

Maybe you are looking for