Trying to find selling price based on most current date

Need help on finding the selling price based on the most current date.  I'm able to get the current date but not the selling price for that date.  Any help will be appreciated.
Thank you in advance.
This is the pivot table I'm working with.  The price should be 5.81 but it's picking up the highest price and not the last price.
Formula for current date is =LASTDATE('Product Cost'[EFFDATE])
Formula for current price is  =LASTNONBLANK('Product Cost'[STDCOST],LASTDATE('Product Cost'[EFFDATE]))
Row Labels
Current Date
Current Price
1152
09/29/2014
6.01
Should be 5.81
1/1/2009
01/01/2009
5.5
7/9/2009
07/09/2009
5.11
1/4/2010
01/04/2010
5.15
4/12/2010
04/12/2010
5.18
7/12/2010
07/12/2010
5.18
10/27/2010
10/27/2010
5.18
12/21/2010
12/21/2010
5.48
12/27/2010
12/27/2010
5.18
1/5/2011
01/05/2011
5.48
1/17/2011
01/17/2011
5.47
4/4/2011
04/04/2011
5.56
8/22/2011
08/22/2011
5.45
1/2/2012
01/02/2012
5.9
1/2/2013
01/02/2013
6.01
1/6/2014
01/06/2014
5.84
9/29/2014
09/29/2014
5.81

Hi Mike,
Something like this should give you the behaviour you're after:
Current Price:=
CALCULATE(
MIN(Product Cost[STDCOST]),
FILTER(
ALL(Product Cost),
Product Cost[EFFDATE] = MAX(Product Cost[EFFDATE])
Regards,
Michael Amadi
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to vote it as helpful :)
Website: http://www.nimblelearn.com
Blog: http://www.nimblelearn.com/blog
Twitter: @nimblelearn

Similar Messages

  • BI Integrated Planning - Most Current Data in Query

    Hi Experts,
    I have a small question about Integrated Planning, for a better understanding.
    in a workbook I have a reporting query and a button. the button triggers a planning function that is executed at another query (which is not displayed in the workbook).
    Both query's are built upon the same aggregate of a real time InfoProvider.
    Now when I execute the planning function, the new data (that is in the open request in the infoProvider) made by the planning function, is immediately displayed in the reporting query.
    But I did not inserted a 'most current data' infoobject in the reporting query.
    So how come that the data in the open request is displayed in my reporting query?
    Is this a new functionality of IP?
    Gr,
    K
    Edited by: Koen V on Feb 12, 2008 8:22 AM

    Thanks for the fast reply.
    Two times yes:
    - I meant the variable 'most current data'.
    - the queries are built on the same aggregate.
    So when you built a query on an aggregate on which a function is executed, it reads automatically the most current data.
    How does this happens? Is this a filter that is automatically set on the aggregate?
    I will assign points.
    Gr,
    K

  • Most Current Data

    Hi,
    There is the variable 0S_RQMRC "Most Current Data"
    for BW 3.5 for transactional cube in BEx.
    Can anybody say what can i use in Netweaver 2004s
    instead of this variable for real-time cube?
    Thank you.

    Go to the RSRT Properties and you can specify the ability to read open requests directly in the data integrity property.

  • Show options for projected amount of time based on the current date?

    I'm wondering if anyone has any ideas on how to go about this, or has done something similar before.
    I would like to be able to have the user see what the current date is, and then based on that, be able to schedule an appointment for say, the next two weeks, given that they can select either a Tuesday or Wednesday. (When they "schedule" an appointment, I would just be sending out that info to a spreadsheet or something.)
    So, if today is Tuesday, 6/10/14, they will then see that they can select either Wednesday, 6/11, or a different Tuesday or Wednesday within the next two weeks. Ideally, they would be able to see all of those possible dates listed out, and click/select one.
    If this isn't possible in Captivate, is there another way to do this, and then embed that within that as a web page or object in Captivate, or run a script, maybe?

    I don't think you'd find a way to do the actual date changes and scheduling through CP - that's far more advanced that it's intended for. If there is a way, it'll take complex Actionscripting (and likely external javascripting).
    BUT if your developers can create a webpage that does this (i.e. .NET or PHP), sure, you could put that on a webserver somewhere then use a 'Web Object' in CP to import that page into an iframe so users can interact.
    CP won't know what the users are doing in the iframe...but with CP you could put instructions on the page too, maybe some general callouts, and follow up with a quiz or so.

  • TS3212 I tried to update my itunes to the most current version. Gave me an error saying an app has made an attempt to load the C RUNTIME LIBRARY incorrectly. Then later it a new message saie windows error 1114 Reinstall Itunes. I don't want to lose my dat

    I am unable to update my itunes. I received the following message. "An app has made an attempt to load the C runtime librarhy incorrecly. Showed this number R6034 " It stated contact the applications support team. Tried again and received Error 7 windows error 1114 Reinstall iTunes and I need help. Thanks

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support (if this won't uninstall move on to the next item)
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    The uninstall and reinstall process will preserve your iTunes library and settings, but ideally you would back up the library and your other important personal documents and data on a regular basis. See this user tip for a suggested technique.
    Please note:
    Some users may need to follow all the steps in whichever of the following support documents applies to their system. These include some additional manual file and folder deletions not mentioned above.
    HT1925: Removing and Reinstalling iTunes for Windows XP
    HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    tt2

  • What is the best way to keep 7 days most current data in tabledata

    Hi,
    Can anybody help me to keep most recent 7 days data in a table? any data older than 7 days should be removed which cen be done once a day.
    What is the best way to do this? partition, re_create table or anything else?
    Thanks
    George

    Have you considered partitioning the table? You could then drop the oldest partition every day, which would be marginally quicker & easier than deleting the 10,000 rows. 100,000 rows is a pretty small table to partition, but it may be worth considering.
    I wouldn't expect there to be a significant difference on query performance no matter how you set this up. You won't reset the high water mark, but that is only important when you are doing a full table scan and Oracle will reuse the space for the current day's data, so it's not like the high water mark will be constantly increasing.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Scheduling the Webi report based on the current date

    Hi ,
    Can I schedule the report to give the results of the previous day (report Daily) and other one to give the results of the previous month (report Monthly)? How can I do it?
    Thanks in advance.

    Hi Peter,
    Well for yesterday, you can use something like:
    CAST(CONVERT(VARCHAR, T_GVQSTATCG1_HOUR.DATE_YYYYMMDD, 110) AS DATETIME) = DATEADD(dd,-1,(select T_GVQSTATCG1_HOUR.DATE_YYYYMMDD from YourTable where Current_Day_Ind = 'Y'))
    We have a date table in our data warehouse with a Current Day Indicator field. If you don't have something like that, then you should be able to just use:
    CAST(CONVERT(VARCHAR, DateAdd(dd,-1, GetDate()), 110) AS DATETIME)
    You would use something similar for previous month, parsing out the month number from the date, and then subtracting 1, except of course for January, where you could just plug in a case statement to handle that.
    This is assuming you are on SQL Server. Syntax may be different in Universe for Oracle or other.
    Does that make sense?
    Thanks

  • Someone tried to find my Iphone, how can I trace who it was?

    Apple emailed me and said someone tried to find my iphone, gave me a time date and model of iphone. How can I find out or trace who tried finding my phone?

    The most anybody will be able to tell you is that it was somebody who knew (or guessed) the Apple ID and password you use for iCloud, so he/she appeared to *be* you when logged into Find my iPhone. (If you are using Family Sharing, it could be somebody else in your family group or somebody who knew or guessed their iCloud Apple ID and password.)

  • Selling price in the Pricing procedure

    In my implementation the company is arriving at the selling price like this:-
    Basic GLP Price     100
    Freight  & Insurance @5%      5.00
    Sub Total      105.00
    Exchange to INR @  1Euro=Rs.1.00(For ex.) 105.00
    Loading  1%      1.05
    ***. Value      106.05
    Basic Customs Duty at 15 %      15.91
    Sub Total      121.96
    CVD 16%      19.51
    Cess on CVD 2 %      0.39
    Sub Total      141.86
    Total Duty      35.81
    Cess on  Total Duty 2%      0.72
    Clearing Charges 1%      1.42
      TOTAL COST  ( CIF + C DUTY+ CVD+ CESS +CL CHRG)      142.95
    Sub Total cost without CVD      <b><u>123.04(Selling price)</u></b>
    I want this selling price to be picked up once I punch in the material part no. in my sales order. Can I get this selling price directly without using the pricing procedure? Can I hardcode the selling price or can i use some selling price simulation? Since the data to arrive at the selling price is dynamic is it advisable to hardcode the SP or to use different condition types to arrive at this selling price?

    Hi Arindam,
    It is advisable to create a new condition type so that in future it will be useful for the reporting purposes related to sales order documents.
    Othewise you can write a exit ( Requirement/ Formula etc ), and do the  calculation part for the selling price what you have mentioned in any of the mandatory condition type which you are using in sales orders, so that selling price value will always get populated.
    Thanks
    Lakshman

  • T/X model SORTing Find/Search results from Most Current Entry

    Have the Palm T/X model, and use the FIND/search function constantly.
    The results always come up from the earliest (oldest) entry to the most current.
    This is a major league pain-in-the-butt especially when there are tons of entries to go thru to get to the most current date.
    Is there any way to sort the FIND results so that they show from most Recent entry to the oldest.
    This would be a HUGE Help.
    Thx!
    Post relates to: Palm TX

    There is a pulsing, reddish dot in the middle of the
    blue light but on the hard drive itself, I don't see
    any "lights" in any "menu bar".
    It's at blue circle with a white Q-shaped symbol at the right end of your menu bar.
    If you dare to use the terminal application (can be found in the utilities folder) you can use the following command to re-index that drive. Start Terminal and type (or paste) the following line and hit enter:
    sudo mdutil -E "/Volumes/xxx/"
    Replace "xxx" with the name of Your drive! If there is a space in that name type it like "/Volumes/My\ Drive/"! You will be prompted for Your admin password to proceed.

  • Selecting based on current date

    I wonder how I can set a value in a table based on the current date. I have viewed most of the posts and I found that it is straight forward to get current date. But my problem is to pass that current date for the comparison in my select statement. For example
    I can get date using the select statement but I don't know how to use it in the next select statement. See below
    select sysdate
    from dual;
    Like here,
    UPDATE PAYMENT (payment_date)
    SET (sysdate) /* this does not work */
    WHERE pid='8';
    So what do I need to do to set the payment_date field correctly? (for the reference my PAYMENT table is shown below for clarity)
    CREATE TABLE PAYMENT     
         (pid          VARCHAR(15)          NOT NULL,
         rid          VARCHAR(15)          NOT NULL,
         payment_date     DATE,               
         due_date     DATE,
    PRIMARY KEY(pid));
    I would very much appreciate your response. Thank you.
    Edited by: user10653046 on Nov 30, 2008 12:30 AM

    If I'm not mistaken, you are asking about the basic syntax of an UPDATE statement?
    You can find that in the SQL Language Reference. A link to the part where it talks about the UPDATE statement: http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_10008.htm#SQLRF01708
    An example:
    SQL> CREATE TABLE PAYMENT
      2  (pid VARCHAR(15) NOT NULL,
      3  rid VARCHAR(15) NOT NULL,
      4  payment_date DATE,
      5  due_date DATE,
      6  PRIMARY KEY(pid));
    Tabel is aangemaakt.
    SQL> update payment
      2     set payment_date = sysdate
      3   where pid = '8'
      4  /
    0 rijen zijn bijgewerkt.Regards,
    Rob.

  • Last month end date based on current date

    Hi,
    How to show last month end date based on the current date.
    Eg:
    Current date = "08/26/09"
    Var- Last Month End Date = "07/31/09" etc...,
    Please help me how to get it...
    Thank You!

    Good to hear that it worked for you. but not for me.
    I tried like this:
    1st::
    1. var1= ToDate("06/30/09","MM/dd/yyyy")
    2.Var2= RelativeDate([Var1];-DayNumberOfMonth([Var1]))
    result: 5/30/09
    2nd:
    RelativeDate('6/30/2009';-DayNumberOfMonth('6/30/2009'))
    result: 5/30/09
    Am working on SAP OLAP cubes.
    Please help me where am going wrong....
    Thank You!

  • How could I go to a frame based on today's date?

    I am trying to write an action that would go to a frame based on the current date (so if it was August 11, 2013 it would go to frame 5, for example.)
    How could I do that ?

    var d:Date=new Date();
    gotoAndStop(d.date);

  • How to select the most recent date in a CR XI subreport

    Post Author: rickcf
    CA Forum: General
    I have a sub report and it is simply a reporting of a sub table.  It is a table that has multiple records with many dates coupled with types.  I only want the most current date for certain types - the types can have more than one date.  Much like the following select statement
    select type, max(date) from table where type <> 'E' group by type.
    How can I accomplish this in crystal? 
    Thanks

    Post Author: Jagan
    CA Forum: General
    Group on type. Use record selection formula for type <> E, use group selection formula for the max date. e.g. group formula is{table.date} = maximum({table.date, table.type})

  • Update once only most current record that meets conditions

    Want to only allow the most current date with the stateID of 1 to update once and not update after the intial update when running sql code over again. 
    changeTypeID containerID    stateID dateEntered                               note
    UPDATE          900172-0800  5       2014-09-23 04:38:29.313            Pallet #71809
    UPDATE          900172-0800  1       2014-11-20 09:17:51.017 
    UPDATE          900172-0800  10      2014-11-24 15:03:32.177   900172-0800->Destroyed
    UPDATE          900172-0800  10      2014-11-24 15:04:00.777   900172-0800->Destroyed
    UPDATE          900172-0800  10      2014-11-24 15:05:44.763   900172-0800->Destroyed
    SELECT containerID
    INTO #Temp
          ContainerHistory
          WHERE dateEntered >= DATEADD(DAY, DATEDIFF(DAY, 0, CURRENT_TIMESTAMP) -1, 0)
            AND dateEntered < DATEADD(DAY, DATEDIFF(DAY, 0, CURRENT_TIMESTAMP), 0)
            AND stateID = 1 ORDER BY dateEntered DESC ????
    UPDATE ContainerStates
      SET stateID = 10,
       dateEntered = getdate(),
       note = containerID + '->Destroyed'
      WHERE containerID IN (
       SELECT barCode AS containerID FROM #Temp WHERE containerExpired = 1

    >> Want to only allow the most current date with the state_id of 1 to update once and not update after the initial update when running SQL code over again. <<
    Please follow basic Netiquette and post the DDL we need to answer this. Do you know how to follow industry and ANSI/ISO standards? You should follow ISO-11179 rules for naming data elements. You hjave noi idea what that means.  Avoid dialect in favor of
    ANSI/ISO Standard SQL. 
    There is no such attribute as a “change_type_id” in RDBMS. You can have a “<something>_id” “<something>_type” but not a weird mix of attribute proprieties. Likewise, “state_id” makes no sense. If you meant a status, then you need two dates to show
    when that state of being applied to the entity. 
    To track the history of, say, Foobars we need to see time as a continuum and model it as (begin_date, end_date) pairs that define when a foobar had a particular value. Here is the skeleton. 
    CREATE TABLE Foobar_History 
    (foo_id CHAR(9) NOT NULL, 
     start_date DATE NOT NULL, 
     end_date DATE, --null means current 
     CHECK (start_date <= end_date),
     foo_status INTEGER NOT NULL, 
     PRIMARY KEY (foo_id, start_date)); 
    When the end_date is NULL, that state of being is still current. You use a simple query for the status on any particular date;
    SELECT * 
      FROM Foobar
     WHERE @in_cal_date
         BETWEEN start_date
          AND COALESCE (end_date, CURRENT_TIMESTAMP);
    There are more tricks in the DDL to prevent gaps, etc
    CREATE TABLE Events
    (event_id CHAR(10) NOT NULL,
     previous_event_end_date DATE NOT NULL  
     CONSTRAINT Chained_Dates  
      REFERENCES Events (event_end_date), 
     event_start_date DATE NOT NULL, 
     event_end_date DATE UNIQUE, -- null means event in progress
      PRIMARY KEY (event_id, event_start_date), 
     CONSTRAINT Event_Order_Valid 
      CHECK (event_start_date <= event_end_date), 
     CONSTRAINT Chained_Dates 
      CHECK (DATEADD(DAY, 1, previous_event_end_date) = event_start_date)
    -- CHECK (previous_event_end_date + INTERVAL '01' DAYS) = event_start_date)
    -- disable the Chained_Dates constraint
    ALTER TABLE Events NOCHECK CONSTRAINT Chained_Dates;
    GO
    -- insert a starter row
    INSERT INTO Events(event_id, previous_event_end_date, event_start_date, event_end_date)
    VALUES ('Foo Fest', '2010-01-01', '2010-01-02', '2010-01-05');
    GO
    -- enable the constraint in the table
    ALTER TABLE Events CHECK CONSTRAINT Chained_Dates;
    GO
    -- this works
    INSERT INTO Events(event_id, previous_event_end_date, event_start_date, event_end_date)
    VALUES ('Glob Week', '2010-01-05', '2010-01-06', '2010-01-10');
    -- this fails
    INSERT INTO Events(event_id, previous_event_end_date, event_start_date, event_end_date)
    VALUES ('Snoob', '2010-01-09', '2010-01-11', '2010-01-15'); 
    What you did post is awful. Why did you append “->Destroyed” to an identifier? This is redundant AND destroys the integrity of the original encoding. Why do you use a local temp table? This mimics a  1950's scratch tape and no SQL programmer would use
    it. Why would a note repeat another column? 
    Please read this and try again. 
    https://www.simple-talk.com/sql/t-sql-programming/state-transition-constraints/
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

Maybe you are looking for

  • Preview doesn't open files upon reboot

    I have the autolaunch feature set in Lion, and when I reboot and Lion attempts to open all of the Preview files that were open before reboot, I keep getting error messages that I don't have permission to open these files. I have not changed any permi

  • Details about HRForm Transaction in ABAP-HR

    hi guys, can anyone plz tell me how to create Infostar,infonet and metanet in HRForms transactions? thanks & regards Dasaradh

  • Approval of Out going payments

    Hi Experts, I want to enable the Outgoing payment Approval. Bot for Cash Approval It should use one template and for other payments it should use another template. I Used following queris for this For Cash SELECT distinct 'True' from  OVPM WHERE Cash

  • EBS 12 - Forms not working.

    Hi, We have a EBS-12 running on a windows 2003 EE. For some reason the FORM are not getting loaded. Earlier the FORMS use to work fine, looks like there is something that we have messed up. Not able to figure out exactly what. If i click on the any r

  • Infoview error window - BOXI - R2 - Opendocument URL

    Post Author: karun CA Forum: .NET Hi, I was using opendocument.aspx to open a report from BO in an asp.net application. I use the open document url as src in an iframe to display the reports. Everything works fine, but I have only one problem, when I