Help on formula Veriable

I have a key figure "Net Price" is an Attribute of one InfoObject "Material Price".
I have created a formula variable with replacement path processing type, Replacement path as "Material Price" with Attribute Value as"Net Price".And also I'm maintaining this Net price based on Week and month.
But,i'm using month as a user entry option in my query. Now, the problem is coz for this variable.
For eg, Lets say I have 5 weeks in a month and Net price for the Week 41/2007 to 43/2007 is "1548" and week 44/2007 to 45/2007 is " 1118.33 ". User want to see the value always from week 45/2007 ie., "1118.33" in the report.
my report is based on the Month, it will always takes the first week ("From value") of the month, so we can see the value as "1548" as price in the report. Even i tried to create a new formula variable should pick up the "To value", but its always picking up the first value.
Is there any way to fix this issue. Please help me out for this issue.

Hi,
you can use the variable 0P_CWEEK which return the current week.
If you want to specifie the function which return a week from a date is 'DATE_GET_WEEK':
CALL FUNCTION 'DATE_GET_WEEK'
    EXPORTING
      date         = l_calday
    IMPORTING
      week         = l_calweek
    EXCEPTIONS
      date_invalid = 1
      OTHERS       = 2.

Similar Messages

  • New to Crystal reports and need help with formula

    Post Author: dausa
    CA Forum: Formula
    I will try to keep this short and sweet.
    Data comes from excel sheet and I am doing a outter left join.
    The need: IF the status is S or N, then i want it to sum the qty required for each part number.
    my formula looks like this;  If ({WIP_ORDER.STATUS}) = 'C OR N' Then SUM ({WIP_ORDER.QUANTITY_REQUIRED}, {ORIGINAL_.PART NUMBER})
    thanks for any help
    dausa

    Post Author: Manuel de Kleine
    CA Forum: Formula
    Dausa,You could use a formula like below:IF  ({WIP_ORDER.STATUS}) IN ['C','N']THEN 1ELSE 0Now, you can do a SUM on this formula.

  • Crystal Reports 2008 - help with formula to retrieve lastfullmonth

    Hi, I'm new to this forum.  First post.  I have a SQL query where
    :month(CAST(a.LAST_MOD_DT / 86400 AS datetime) + CAST('01/ 01/1970' AS datetime)) = (MONTH(getdate())- 1)
    I need to create a CR formula that will pull in data from last month as this report will be run on a monthly basis.  If I use 'getdate() -31' there will be a problem with the months that don't have 31 days.
    I'm also very new with creating formulas so including an explaination would be helpful.  Thanks,
    Joyce

    Sorry for the slow repsonse in getting back to you.
    I wasn't able to get the SQL query to work.  I did find one that does work except I need to find out how to pull in the minimum date and the maximum date of the records into the report.
    Here's the SQL query:
    --to query for the prior month,  if January then month = 12 else month = (current month - 1 month).
    and
    month(CAST(a.LAST_MOD_DT / 86400 AS datetime) + CAST('01/ 01/1970' AS datetime)) =
    CASE WHEN cast(DATEPART(Month,GETDATE()) as datetime) = 01
                          THEN month(cast((str(12)+'/'+ str(01) +'/'+STR(YEAR(Getdate())-1)) as datetime))
                          ELSE MONTH(cast((str(DATEPART(Month,GETDATE())-1)+'/'+ str(01) +'/'+STR(YEAR(Getdate()))) as datetime)) END
    --to query for the proper year, if January then year = (current year - 1 year) else year = current year.
    and
    year(CAST(a.LAST_MOD_DT / 86400 AS datetime) + CAST('01/ 01/1970' AS datetime)) =
    CASE WHEN cast(DATEPART(Month,GETDATE()) as datetime) = 01
                          THEN year(cast((str(12)+'/'+ str(01) +'/'+STR(YEAR(Getdate())-1)) as datetime))
                          ELSE year(cast((str(DATEPART(Month,GETDATE())-1)+'/'+ str(01) +'/'+STR(YEAR(Getdate()))) as datetime)) END

  • Need help with formula in Numbers for iPad 2

    I have a spreadsheet with a formula such as b2 x c2  very simple.  However, if the formula cells (b2 and 2) are blank then the destination cell contains a zero. How can I make my destination cell b blank while the formula cells are blank? I got thsvresponse from a person working with Mac os x, if this helps...
    I can't seem to make this work in my formula bar on ipad2!
    =if(isblank(<source cell>), "", <What ever your formula is>)
    Thanks for any suggestions!
    iPad 2

    Your friend was close, but forgot one thing. If you want it to be blank if either cell is MT, then you need an OR as well o test if either one or the other is blank...
    =IF(OR(ISBLANK(a1),ISBLANK(b1)),"",a1xb1)
    The isblank can also be represetned by ="" in many cases, usually accompanied with a trim to make sure there are no spaces were entered...
    =IF(OR(TRIM(a1)="",TRIM(b1)="")),"",a1xb1)
    Jason

  • Seeking Pdf form help - javascript formula to auto-populate fields based on data from other fields.

    Hi there, I am new to PDF form work, and am wondering if someone could help me with a javascript formula.
    I want to auto-populate the EXPIRYDATE field, as the same date as the entered AUTHORIZATIONDATE field, but 4 years later.
    So, I want to be able to enter 11/14/2014 in the AUTHORIZATIONDATE date, and have 11/14/2018 auto populate in the EXPIRYDATE field.
    Seems simple I know, but I've messed around quite a bit and can't seem to make it work. Is this possible??
    Any help would be very much appreciated!!

    And what have you done?
    This can only be done with custom JavaScript programing.
    The value of date type fields are text field and not numeric data. The first task is to convert the dates to a number on some type of number sequence that is a mapping to dates.
    Have you looked at the Acrobat JavaScript API Reference, the MDN JavaScript reference?
    I would use the Acrobat JavaScript util.scand to covert the date string to the number of milliseconds from January 1, 1970 midnight. and then use the getFullYear method of the date object for the year value and add 4 years to that value and then use the setFullYear method to set the year for the date object. Now you can use the util.printd method to format the date object as a date string with a specific format.
    // get the date value, format of date string and years to add;
    var cDate = "11/14/2014"; // date value;
    var cFormat = "mm/dd/yyyy"; // date format;
    var nYears = 4; // years to add;
    // convert date string to date object;
    var oDate = util.scand(cFormat, cDate);
    if(oDate == null) {
    app.alert("Error converting " + cDate + " using format " + cFormat, 0, 1);
    // add years to date object;
    oDate.setFullYear(oDate.getFullYear() + nYears);
    // display result;
    var cExpireyDate = util.printd(cFormat, oDate);
    app.alert("Authorization Date: " + cDate + "." +
    "\nExpire Date: " + cExpireyDate, 3, 0);

  • Need help with formula in FR 9.3.1

    I am trying to recreate this excel formula for a % change in a balance sheet report. Column A in my report is equal to C37 in the formula and Column C in my report is equal to E37 in the formula. I want it to work for the whole column. Any help would be greatly appreciated,
    Thanks, Donna
    =IF(E37=0,0,IF(ABS((C37/E37)-1)>5,"",(C37/E37-1)))

    Also I should say the VariancePercent function gets me the correct number if I use
    VariancePercent([a],[c])
    but not the right sign.

  • Drop-Down-Box (F4 Input Help) for formula variable in BEx Analyzer (BI 7.0)

    Hi Gurus,
    is it possible to get a drop down box for a ready for input formula variable in the BEx Analyzer (not BEx Web!)?
    We want to let the users choose scaling factors 1, 1000 or 1000000 (implemented via this formula variable). In the settings of the formula variable you can only choose a default value but there seems to be no option to provide all three factors in a drop down box like the ones for characteristic value variables.
    We could prevent other entries in the variable pop up via customer exit (i_step 3) but the business is wishing an F4 input help like the ones for characteristic values.
    Thanks for your help,
    Marco

    Hi Macro,
    Its not possible to get drop down box for a ready for input formula variable. Because it is possible only for characterstic value variables but not formula variable.u donnot get any drop down box like ready for input for formula variable.
    Regards,
    Premalatha.C

  • Need help with formula that puts values in Field1 based on value of field2

    I have two custom fields in the Contact record - Date met and Time Known. Date met is a standard date field that is entered by the user. I then wanted Time Known to automatically populate with specific values based on a formula I wrote. However, the formula/function is not working properly.
    I'm also not sure if this should be a pre or post field formula, field validation, or workflow. Please help! Here's the formula I have so far. It worked for a new record created, but now doesn't work at all for some reason (probably from my testing).
    IIf(Today()-[<dResearch_Date_ITAG>]<365,"Less than One Year",IIf(Today()-[<dResearch_Date_ITAG>]<1095,"One to Three Years", IIf(Today()-[<dResearch_Date_ITAG>]<1825,"Three to Five Years",IIf(Today()-[<dResearch_Date_ITAG>]<3650,"Five to Ten Years","Ten Plus Years"))))
    This says the following:
    If Date Met is less than 365 from today, then enter "Less than One Year" into the Time Known field;
    if date met is less than 1095 (but greater than 365) days from today, then enter "One to Three Years"
    if date met is less than 1825 (but greater than 1095) days from today, then enter "Three to Five Years"
    if date met is less than 3650 (but greater than 1825) days from today, then enter "Five to Ten Years"
    otherwise, enter "Ten Plus Years" for all values greater than 3650.
    What am I doing wrong? I'm new to expressions and formulas in Oracle.

    Hi, You have to do @ 2 places. For setting the field value @ the time of creating a new record using the field default feature. Check post default as the calculated value is dependent on some other field that you are going to set @ the time of creation. For updating the field whenever the record is modified, use workflows
    -- Venky CRMIT

  • New to OBIEE need help with Formula

    Is it possible to use a prompt in a column formula filter for e.g. FILTER("Defect Facts"."Detected on Date" USING "Defect Facts"."Detected on Date" = '@{11/20/2009 12:00:00 AM}')) this formula does not works for the column. What i need to do is create a filter that will only pull back the date > 11/12/2009 using the formula. Am I doing something wrong? Is there a way to create a filter in the formula and not create a filter for my report? If i create a filter for my report and do a drill down it ignores the date and pull back all defects.
    Thanks for your help
    Edited by: CedricG on Dec 28, 2009 11:37 AM

    Ok my problem may not be the filters. I created a detail drill down for my defects and created a second report with the number of defects. In the second report, I created a table that displays the total number of defects by Product and severity.
    Ex:
    Defect
    Total Defect
    Product S1 - Critical S2 - High S3 - Medium S4 - Low
    RPAS 6 1 2 3
    RMS 7 2 1 3 1
    Grand Total 13 2 2 5 4
    I used Bins to group my products and name them one name.
    Ex:
    1) Product is equal to / is in "RPAS for Merch Financial Planning - 1814", "Extract Tranform and Load - 1803" and named that Bin RPAS
    2) Product is equal to / is in "Merchandising System - 1816", "RMS" and named that Bin RMS
    If i wanted to see what are the 2 defects for RPAS that's a S3-Medium, I would select the 2 but it displays 414 of the defects in my database and not the two taht i'm expecting. I think my problem is I'm passing the "RPAS" to my defect drill product prompt and not the actual value Merch Financial Planning - 1814. Do you knw how to get around this? It works if i dont group them in the Bin.

  • New to Numbers, help with formula please.

    I am trying to find the formula which best does the following for me.
    I have a spread sheet with four colums.
    Colum A.  Shows Text, heading of locations, eg  Home, Away, Hotel etc.  Then beside these columns i have the days i arrive and depart the locations.  The forth column shows the total of nights spent in each type of accommodation
    Eg
    Ongoing Table
    Home          Date          Date          5
    Away           Date          Date          5
    Home          Date          Date          5
    Hotel          Date          Date          5
    Home          Date          Date          5
    Hotel          Date           Date           5
    Away          Date          Date          5
    As this in an ongoing list, I am looking to have a section that will automatically and continually add up the total nights I spend in different types of accommodation.  So, in summary I can look at it the following way
    Summary Table
    Home          15
    Away          10
    Hotel          10
    So that when I enter in a separate line in my ongoing table, it automatically keeps the running tally in my Summary Table.
    Thanks in advance for your help.

    Dolmio,
    Let's say that your log table is named Ongoing. The expression in your summary table, column B, would be:
    =SUMIF(Ongoing :: A, A, Ongoing :: D)
    Jerry

  • Help with formula that is dependent on checkboxes

    Hello -
    I can't figure out this one for the life of me... In column A there is a list of tasks, column B has check boxes for each task. Column C has the starting day number of each activity, and column D has the duration of each activity.
    I'd like to check each box for the activities that I'd like to do, enter the duration of the checked tasks, and have the table figure which task starts on which day. ie: - if tasks A, D, & E are checked, then it shows that task A starts on day 1, runs for 2 days, task D starts on day 3 & lasts for 5 days, & task E starts on day 8, and lasts for 4 days.
    Should this be an IF formula? I'm not sure how to make everything dependent of the check box status. Here's a link to the table, if that helps
    http://www.sendspace.com/file/rckrn2
    Thanks
    Jeremy

    Hi Jeremy.
    For starters, I'm less than favourably impressed with your choice to place the file on a site whose first choice, when clicked starts to download a Windows executable file.
    A better choice, and a more 'standard' one here would be to place a screen shot of the result you hope to achieve in your post.
    I've done a little reorganization of your table, adding one column to those described above to avoid having a calculated column between two entry columns.
    Tasks are listed in column A, checkboxes in column B. The estimated duration of each task is listed in column C.
    Columns D and E are calculation columns.
    The value from C is transferred to E if the checkbox is checked in that row.
    Column D determines the starting day  for each checked task, with the assumptions that the tasks will be done in the order they are listed, that each must be finished before starting the next, and that the new task starts on the day the previous one is finished.
    Formulas:
    D2 and filled down to D10: =IF(B,1+SUM($E$1:E1),"")
    E2 and filled down to E10: =IF(B,C,"")
    Row 11 is a Footer row. The formula in E11 is =SUM(E)
    You might find the arrangement below a more logical order for the columns. Note that a different selection of tasks has been made, and the calculations automatically adjusted:
    Revised formulas for this order:
    D2: =IF(C,1+SUM($E$1:E1),"")
    E2: =IF(C,B,"")
    Regards,
    Barry
    PS: Details, and further examples, for each of the functions used are available in the iWork Formulas and Functions User Guide. The guid may be downloaded via the help menu in numbers.
    B

  • Help with Formula/Placeholder columns for group totals

    I have select that is broken into 2 groups (a COMPANY group and a DETAIL group within company). I need to determine the COMPANY group totals based on values in a column in the DETAIL group. I.E. the column is a transaction description and can have up to 15 different values and it did not appear that a summary column would work for what I need. I have currently set up 15 formula columns in the DETAIL group and check the value of the REASON to accumulate totals and return the total to a PLACEHOLDER column (which is numeric and defined in the COMPANY group).
    I then report the Placeholder columns at break of COMPANY. This all works fine if I run only one company. If I run with multiple companies the Placeholder columns are used as a running total.
    My question is how do I reset the PLACEHOLDER columns at company break if at all, or is there a simpler way to accomplish what I need.
    Any and all assistance would be greatly appreciated.
    Tom Vereecke

    If you are using one placeholder column in different formula columns just ignore the following solution. It will not work in that case. I will post it here if i find out any way to initialize placeholder columns at different groups or anyother way to solve this issue.
    I think if you remove placeholder columns and create summary columns at Company Level, that will work. And formula columns will be changed as follows:
    Formula Column:
    active_total number(10) := 0;
    begin
    if :status_1 = 'ACTIVE' then
    active_total := active_total + 1;
    end if;
    if :status_2 = 'ACTIVE' then
    active_total := active_total + 1;
    end if;
    if :status_3 = 'ACTIVE' then
    active_total := active_total + 1;
    end if;
    return active_total;
    end;
    And in summary columns source will be formula columns. And reset the summary columns at Company.
    Hope this helps.
    Message was edited by:
    fs

  • Need help adjusting formula on time sheet

    I am using this formula to show OT hours worked based off N21 being the total hours for the day. It needs to use the DUR2HOURS or it doesn't work properly.
    =MAX(DUR2HOURS(N21)-8, 0)
    I have another cell to calculate double over time, which is anything after 12 hours.
    How can I adjust the above formula to show the OT hours but not the DOT hours?
    Thanks in advance for any help!!!

    For the specific case of the duration in N21, the above expressions would be:
    Standard Pay...
    =DUR2HOURS(MIN(N21, "8h"))
    OverTime...
    =DUR2HOURS(MIN(MAX("0h", N21−"8h"), "4h"))
    Double OverTime...
    =DUR2HOURS(MAX("0h", N21−"12h"))
    Jerry

  • Need help writing formula to count checked boxes

    This is probably a no brainer for you experts but I am making a spreadsheet for scoring a test and I have put in check boxes. Beside in the adjacent cells to the cells with check boxes I have placed the values that correspond to those check boxes. I want to be able to format a cell to do several things.
    First I need to link the adjacent values to the check box cell that it corresponds to.
    Then I need to format a cell to
    1. Count the number of boxes that have been checked.
    2. Display the values that are linked to cells if the total is 10 or under
    3. Display text that relates to the values that are linked to the cells.
    Your help is greatly appreciated.
    Shane

    The Pickler wrote:
    In answer to your first question. Each question is multiple choice and my layout is chosen to mimick the test itself for easy scoring.
    So I take this to mean that it is only valid to have one check per row.
    Second, if there are more than 10 I want it left blank.
    Right now, it is simpler to have this behave the the other way, in that it eliminates a complicating special case.
    So here's a screen shot of what I have on this:
    !http://img227.imageshack.us/img227/6263/questionairesummarywo1.png!
    Let me discuss this and explain some of the changes I made to your initial attempt.
    (1) Since I presumed one check per row, you can see in the "Responses" table I switched over to this type of data entry. This has several advantages and, most importantly, was key in clarifying my thoughts downstream. It does not permit the invalid multi-check per row and can be more readily entered via keyboard. The use of A,B,C,D for the choices is arbitrary; they could be 1,2,3,4 or any other distinct set of 4. If you ever want to simultaneously evaluate several questionnaires this can be accommodated better by adding additional columns to this table.
    (2) The references associated with each question's choices are encoded in the "Key" table. This table can be squirreled away on another sheet dedicated to questionnaire configuration and remain out of harm's way while entering response data. The column headings must correspond with the answer designations used in the "Responses" table.
    (3) The "Tally" table is purely for the computation of the "Summary". It allows both the number of each type of reference to be computed and the listing of the references. Since it is purely computational, it should be hidden away on another sheet.
    (4) The "Descriptions" table is where the association of references and the statements is expressed. Since, like the "Key" table, it is likely edited infrequently, this too should be squirreled away on the questionnaire configuration sheet.
    (5) Finally, the "Summary" table display the counts of each reference type and zero to ten of the references and associated statements. Currently, this shows as many as the first 10 because, as stated above, it avoids a complicating special case and is displayed elegantly via this filtered table (which avoid displaying the unused reference rows). The count is always the total count, even if it is exceeds ten.
    Third, since I don't know the first thing about writing formula's I guess I need to have you hold my hand through this process or teach me some basics. Please.....if your kind and willing enough to do so.
    As there are more than a couple of formulas here, the least time consuming way to explain them is simply to upload this Numbers document to a place you (or anyone else who is interested) can download it. Explore it for yourself and feel free to ask any questions you have about it or how to modify it to better suite your needs.
    You will find that the file contains three sheets. What is presented here resides solely on the third sheet. The first two sheets can safely be ignored/deleted, but I have left them in as they represent two earlier attempts (the first only partial, the second, more complete) at a solution. Some may find them interesting, perhaps containing good techniques for other problems.
    [Questionnaire Summary Numbers Document|http://www.mediafire.com/?1125t9nm9xm|Click to download a zip archive]
    This will take you to a page that will allow you to download the file directly (I apologize for any of this free hosting site's advertisements that you might find offensive). Click on the link in the yellow region on the mid-left part of the page. If all goes well, the zip will download and automatically unarchive into the Numbers document "QuestionnaireSummary.numbers". Let me know if you have trouble.

  • Help with formula script

    Hi guys,
    I need some scripting help with a formula I am trying to create. Basically, the RWDerived property should replace the Spaces in the descrption of a node with an underscore "_". The description property is the system description property. Thanks.
    -- Adi

    From the user guide:
    "The ReplaceStr function, which requires parameters for the old and new pattern, can take
    comma, space, tab, crlf, cr, lf, openparen, or closeparen, in square brackets ([]), in
    addition to normal text strings."
    It's much better to use "[space]" in your formula so that it won't break if someone edits it and changes the way whitespace is handled down the road. That checkbox is such an annoyance!

Maybe you are looking for

  • I lost all my music, but it's still on my computer.

    Hi Everyone! A long time ago, I lost all of the music in my iTunes.  All I could find in my itunes was the iTunes Library Extras music (eg Ninja Tuna by Mr Scruff).  I hoped my music would come back when I updated my iTunes, but it didn't.  Now I'm f

  • Web Dynpro application crashes on startup

    Hi all. After upgrading EP from SP8 to SP13 I have the problem with calling any application in portal(for example, when I try to create new iview in portal content directory). 500   Internal Server Error   Web Dynpro Container/SAP J2EE Engine/6.40   

  • Tax Cide Field as editable for Automatically created Line Item

    Hi How can we make the tax code editable for automatically created line item, when an FI Document is simulated. Thanks & Regards Sanil K Bhandari

  • Different timestamping messages in Acrobat X

    Hi, A couple of weeks back I signed and timestamped an Acrobat document and got the message "Signature is timestamped." I've now requested another timestamp and now I get the message "The signature includes an embedded timestamp." What would cause th

  • Reports with Batch

    Hi Experts We are Implementaing PP - PI for for a pharma company. Since the all the Process oriented, clientt is expecting all the reports with the batch number. For Information, we have configured such that, the batch number can be given as an input