Show latest txn date within certain period

Hi
I need to create a report in BIEE11g to find the latest txn date before May2013 and latest txn date before Jan2013 for each member as below:
member_# latest_txn_date_before_May latest_txn_date_before_Jan
abc1234 24/4/2013 20/12/2012
adf0987 12/2/2013 15/11/2012
I'm trying to use max(date) to find the latest txn date, however, I cannot filter the max(date) before a certain date, eg. filter max(date) using date < 1May2013
The result always show the latest txn date like below:
member_# latest_txn_date_before_May latest_txn_date_before_Jan
abc1234 21/5/2013 21/5/2013
adf0987 12/5/2013 12/5/2013
So I would like to know if there is any function/method I can use to make my report in 11g.
Many thanks!
Edited by: Jamie_C on 2013/5/30 上午 2:35

Try to create 2 metrics in the rpd with below statements. set MAX at aggregate tab
MAX(
CASE WHEN
YEAR( txn date)&lt;> Year(Current_date) THEN
txn date
END
MAX(
CASE WHEN
MONTH( txn date)<MONTH(Current_date) AND
YEAR( txn date)= Year(Current_date) THEN
txn date
END
Thanks,
http://cool-bi.com
Edited by: Srini VEERAVALLI on May 30, 2013 4:51 AM

Similar Messages

  • Getting last-day-of-week dates within certain date range

    Hi all,
    I have the following Challenge:
    I want to know the dates of the last day of all the weeks within a certain range of dates.
    For instance if my range would be 01-jun-2002 - 31-jun-2002
    then the returned days should be (lastday of the week is sunday):
    . 02-jun-2002
    . 09-jun-2002
    . 16-jun-2002
    . 23-jun-2002
    . 30-jun-2002
    I want to accomplish this by only using sql (no pl/sql) in a ora 8.0.x rdbms
    How would I do this? (if it's possible)
    Tia,
    Martin

    Christian's solution returns
    01-JUN-02
    08-JUN-02
    15-JUN-02
    22-JUN-02
    on my system. The first day of the week is dependent on NLS settings.
    SELECT MAX(realdate)
    FROM (
    SELECT TO_CHAR(TO_DATE('31-may-2002','dd-mon-yyyy') + ROWNUM,'IW') weekno,
           TO_DATE('31-may-2002','dd-mon-yyyy') + ROWNUM realdate
    FROM all_objects
    WHERE rownum <= TO_DATE('30-Jun-2002','dd-mon-yyyy') - TO_DATE('01-Jun-2002','dd-mon-yyyy')
    GROUP BY weeknoThe IW format model give ISO standard week numbers and a week always starts on Monday.

  • Mss reporting error - no data stored within selected period

    Hi experts,
    I got a problem when executing mss reporting.
    The error is 'no data stored within selected period'.
    The report works in ecc and the error only happen on portal.
    Please help
    Thanks,
    Rgds,
    Nanie Arianie

    The values from the Launchpad are not being passed correctly to ECC.
    There seem to be some SAP Notes that may be helpful - 1265270,873702, 769717.

  • Go back to unlimited data within 14 day period

    Hello.
    Last night I purchased an iPhone 6 at an apple store. Unfortunately during the process there was some miscommunication between the sales rep & my self regarding the plan I would be changing to. I understood I would lose my unlimited data, however she did not explain that I would move to a plan that "shared" data between all the lines on my account. She said the one we were selecting specifically would be for my line only, and even offered another plan option that would be shared data. Thinking that the 5gb plan I selected would be ok for myself only I went ahead with the upgrade.
    Then upon viewing my account online it is showing that the data is actually shared, it shows my line has 3.5gb per month (I'm guessing this comes from 1/2 of the 5 I added, plus the 2 that was already on another line on my account)
    My question is if I return the phone to the apple store today, would this fall under the 14 day worry free guarantee and allow me to get my unlimited data plan back, and then repurchase the phone at full retail?

        chellyx, you have a great question. First things first, congratulations on being one of the lucky few to get the iphone 6. Next and to answer the big question, yes you can return the phone and go back on the plan that you originally had. You would be under the 14 day WFG. And if you purchase at full reatail then nothing changes on your old plan. You simply did a device change. Which doesnt effect anything at all. Hope that helps. No matter what enjoy the iPhone 6.
    VanetrisC_VZW
    FOllow us on Twitter @VZWSupport

  • Dates within a key period.

    hi all,
    I have a abap program to develop, where in i have a period  key which i am getting from a table, for a particular BP, CA, CO.
    Now i want the all the dates falling in that period key, or may be even the first  date of that period key.
    For example the period key is weekly, ie 00AA for first week of year 2000, i want all the dates in this week.
    I tried many function modules, but none seems to fit my requirement.
    Now i have got the year and week no from the description of the period key, so is there any Fm which could give me the first day of the week based on these two inputs...??
    All answers will be appreciated....!!!

    Hi Rahul,
    I really about the existance of a generic module to handle what you are looking for the PERSL, since PERSL is more like a customer implementation. We have two variations of it - like 2000 representing year 2000 and 0100 representing the first month of year 2000.
    But, you should be able to implement, what you need with the help of the Function module: GET_WEEK_INFO_BASED_ON_DATE.
    You begin like this. Take the first date of that year for the PERSL 4000, in this case 01/01/2000, and then add to get the new date as:
    01/01/2000 + ( 40 periods X 7 days for week ) =  10/07/2000.
    Then use the above FM which gives the result as:
      Import parameters               Value     
      DATE                            10/07/2000                                                                               
    Export parameters               Value     
      WEEK                            200040    
      MONDAY                          10/02/2000
      SUNDAY                          10/08/2000
    In the above week 200040 matches with the period key 4000(40th week of 2000). If this does not match, move the  MONDAY and SINDAY either forward or backward by 7 days to match the period that you are interested in.
    I think you can put this in a wrapper FM so that all your programs can use it.
    Thanks.
    For example the period key is weekly, ie 00AA for first week of year 2000, i want all the dates in this week.

  • How to select data from excel within certain range?

    hi all, i am having an application where i am reading data from an excel sheet. in my case i am taking the date as an input from the user in range i.e starting date and end date in dd-mm-yy format( or to to from)and then i have to read the data of all dates which come between given range by the user....
    how can i do it????
    can anyone help......
    thanks in advance.........

    Did you get the solution for your question ?
    I have the same requirement,
    1. Here, the user will provide the range like maximum and minimum values, then the VI should capture the data within the given range. ( from CSV file as attached )
    2. Then VI should calcluate the average value for captured data and export it to excel.
    This is my requirement can anyone help me on this.  
    Many thanks in advance
    rc_cks
    Attachments:
    sample_short.csv ‏2439 KB

  • Possible to show live data within Performance Widget??

    Hi, I'm trying to create a dashboard which features live data, for example top 10 CPU for windows 2012 servers. However it seems that any performance data is pulled from the DW db and is averaged over and hour or more. I don't want a historical average,
    but rather a widget which updates every * minutes and shows LIVE cpu data from that point in time. No graphs, just a percentage number for each of the top 10 windows 2012 servers consuming cpu.
    Anyone know if this is possible?? It seems that any performance widgets pull data from the DW db rather than the OpsMan main db..
    Cheers,
    Max.

    Hi 
    SCOM write data in parallel to SCOM DB and DW , 
    The chart is optimized to show no more than 100 data points per line to improve querying and rendering performance. It is important to consider this when configuring the time range for the following reasons:
    If the time range is less than 100 hours the widget will show raw data from the data warehouse
    If the time range is between 100 hours and 100 days the widget will show hourly aggregated data
    If the time range is greater than 100 days the widget will show daily aggregated data
    In addition, in order to optimize rendering performance, if the time range is 2 weeks (336 hours) the query will return 336 hourly data points, but the widget will reduce the number of points in the resulting line to approximately 100 points. This is very
    similar to what PerfMon does in Windows.
    you can select 100 minuts as time range to see the data for every min.
    Regards
    sridhar v

  • Organizing by dates within an event

    I'm not exactly sure how to organize photos by date within a certain event, when photos are coming from more than one camera. For example, I have imported pictures on the day my grandson was born from my camera, and I have also added some, within the same "event" sent to me by email, taken with other cameras. There are lots of pictures taken during the course of a few days, but the photos, by date, are not in order. First, I have some that are in the hospital, then there are the ones taken at home, then after that are some more in the hospital. The dates are correct on the cameras and I've set the photos to be arranged by date in iPhoto. Why won't they import in the order, by day, that they were taken, even though they're from different cameras?

    What I'm trying to accomplish is to import photos, no matter where they came from, into an event, and have them all in order by date. Is that possible with photos coming from different sources?
    That is how it works - I have many events with photos from different camera's
    look at the extended photo into (select two photos and go to the photos menu ==> show extended info) and verify that the date/time are the same - it sounds like they may have been set to different time zones time so are an hour or more off
    To see all teh photos from a single camera make a smart album with camera is "the camera" - if one camera's time is off you can select the photos in that smart album and use the photos menu ==> adjust time and date command to correct it
    LN

  • 2LIS_04_P_ARBPL - figures are grouped according to latest posting date!!

    We are trying to fill setup table for App 4 and afterwards when we extract the DS 2LIS_04_P_ARBPL we are getting figures clubbed together based on latest posting date
    for ex: a given production order and type, if AFRU table shows below entries:
    16.01.2012      1.5
    17.01.2012      1.0
    19.01.2012      0.2
    then in setup table we have only one row (figures are grouped and shown against the latest posting date!!
    19.01.2012    2.7
    what is the solution?

    Hi,
    Most of the times data won't fill in the base tables, because the reason is, at the time of data entrry by users, there are certain conditions , so until and un less all that conditions fullfill, then only all feilds will fill in the base tables. I faced the same problem for 2lis_04_p_matnr datasource, I'm not getting Batch, so I enhaced teh datasource. So better add ZZ feild to datasource and enhace the ds based on AFUM table (Based on the process order)
    Thanks
    Reddy

  • Valuated stock for a certain period

    Hi all,
    Using transaction MC.9 (Material Analysis: Stock), you can search for a material for a certain period (ea. 04.2007). The outcome gives you the Valuated Stock for that period.
    In which table is this Valuated stock stored?
    How can I fetch this Valuated Stock (through table, BAPI, ...?
    Many thanks in advance.

    Hi,
    Reading data from MBEWH is tricky since as you correctly pointed out there may not be any record in MBEWH for a particular period.The logic for creating a record in MBEWH is for first relevent entry in the current month create a history record in MBEWH i.e. e.g. if there is a say GIR or any stock movement today & if this happens to be the first entry for materialValuation area then it will create a record in MBEWH for the previous period i.e. 2008/03. Now suppose there is no movement at all say for the period 2008/04 & say 2008/05 materialValuation area in that case as per the above mentioned logic for the first record of the materialVal area for the period 2008/06 it will write a record for 2008/05 but there will be no record for the period 2008/04.so to get the currect valuated stock get all records for materialval area into an internal table where
    period i.e YYYYMM is GE period under consideration. Then sort the internal table on matnrbwkeybwtarlfgjalfmon. Then loop at the internal table & if you hit the first record pick up the stock i.e the stock you are interested in & exit from the loop. However if no record is found in the internal table get the details directly from MBEW. & that's it. You may refer to SAP help for the same. (search for MBEWH)
    I hope this helps,
    Regards,
    Raju Chitale

  • Exchange rate coefficient on the basis of latest posting date in invoice.

    Hi,
    I have one query on posting date(picking of exchange rate coefficient from TCURR table) in invoice verification.  Please help.
    Conditions are--
    vender and company code are not in same currencies(ex-USD and INR). exchange currencies are maintained perfectly on every month 1st ie co-efficients in TCURR table ie OB08
    Query---
    1.At the time of parking invoice suppose i enter the date 20th august and i have posted that invoice as parking. It is converting the local currency as per 8th month exchange rate.
    2.And at the time of final posting the invoice supose i posted that date as 10th September. Business wanted that converting the local currency as per 9th month exchange rate But now local currency is converting on the basis of initial entry of posting date ie 8th month only.
    Please advise and guide what configeration that i have to set for picking the exchange rate coefficient on the basis of latest posting date in invoice verification.
    Thanks & Regards,
    MadhuBabu.

    Hi
    I dont think it is possible as once you enter posting date while in parking invoice screen, on that date exchange rate will be calculated and it wil not be different at time of posting invoice. Instead of parking, you have to directly post with current posting period.
    Thanks

  • Performance data 3 month period in ABAP stack

    I have looked at ST03N and caan't seem to get a three month time period on a transaction per user count.
    I can find the transaction code total steps #'s but I can't see a performance fingure for a transaction.
    Is there reports I can run to list the performance stats on users and tcodes ran over a certain period.
    Thanks
    Weyland Yutani

    Hi,
    you cannot see that old data in ST03N.
    regards,
    rakesh

  • How do I reorder data within a Contacts card?

    I want to reorder the data within individual Contacts cards, e.g., repositioning address A above address B. It ought to be as simple as highlighting a given line and pressing the keyboard's Up or Down arrows, but that doesn't work, and I can't find anything in Apple's documentation or support pages offering an alternative that does work. Nothing on the Web either, except for a third-party app being touted by a company I don't know. I'm running the latest Mavericks on an iMac.

    The justify data select the column by clicking the column header (the letter at the top of the column) then open the formatter (top right):
    then select the "Text" formatter and select the type of aligment you want:

  • MY PDF DOC SHOWS ERROR "INSUFFCIENT DATA " ON EMAILS FROM ACROBAT READER CUTS OFF THE BOTTOM OF THE DOC

    MY DOC PRINTS CORRECTLY BUT EMAIL COPY SHOWS ERROR " INSUFFICIENT DATA" ????

    Hello,
    May I know the version of Adobe Reader you are using.
    If you are using an old version, I would suggest you update to the latest version of Adobe Reader XI and let us know if the issue still persists.
    Regards,
    Nakul

  • Finder shows incorrect modification date

    Another horrible finder bug. It showed a wrong modification date for a pdf file that I had just changed. The date shown was 22 januari, but the correct date, which was displayed only after relauching finder, was 18 februari. The shell command "ls -al" DID show the correct date. Moving up and down the directory hierarchy did not solve the problem, only a relaunch did.
    At the same time I noticed that some other files in the same directory had ridiculous modification and creation dates.  Those dates were something like 2001, 1pm, while the entire directory, including all the files in it, was created on 22 januari 2015. 
    This is similar to a bug I reported here last week, where Finder did not show a certain file at all. I am using a different computer now, so that many hardware related issues are ruled out.
    I will file a bug report. I am spending a considerable part of my time filing Yosemite bugs.

    Had the same thing on my MacBook Air with a 256gb SSD.
    Finder was showing 177gb available. Disk Utility said 54gb.
    I ran the Terminal command suggested by others. And a MIRACLE happened!
    Now Disk Utility says I have 155gb available. But Finder reports an incredible 709gb of free space... on my 256gb drive!
    It must be a blessing from Steve Jobs.

Maybe you are looking for