Using charateristics in formulas

Hello everybody,
I got following problem:
I've got a simpe reports:
characteristics: COUNTRY (like US, DE, GB ...)
key figures:     AMOUNT.
What I need is this: to write an formula in which i make folowing check: if COUTRY = 'US'-> Noth America, if COUNTRY = 'DE' -> Euerop and so on. I ve tried with creating a new variable (in the formula editor), but I didn't help. Is there any way to check the value of charcteristic in a formula.
Any help appriciated.
Thnx.
Pawel

Make sure the characterstic is available in the drilldown.
Also check the document given below:
https://websmp106.sap-ag.de/~sapdownload/011000358700001963972003E/HowToCalcWithAttr.pdf
Thanks.

Similar Messages

  • Using a Math Formula in AS3

    Hi,
    I am trying to test using a math formula (probit function) in AS3. I can't get the script to work: the dynamic text box is displaying NaN after I run the function and use a hard-coded number for the variable. Here's the button's script that is getting a NaN display. I must be doing something wrong and would appreciate any help getting it working.
    stop()
    var p:Number = 39 //hard-code this number for testing
    function NORMSINV(p:Number):Number {
        // Coefficients in rational approximations
        var a:Array = new Array(-3.969683028665376e+01,  2.209460984245205e+02,
                              -2.759285104469687e+02,  1.383577518672690e+02,
                              -3.066479806614716e+01,  2.506628277459239e+00);
        var b:Array = new Array(-5.447609879822406e+01,  1.615858368580409e+02,
                              -1.556989798598866e+02,  6.680131188771972e+01,
                              -1.328068155288572e+01 );
        var c:Array = new Array(-7.784894002430293e-03, -3.223964580411365e-01,
                              -2.400758277161838e+00, -2.549732539343734e+00,
                              4.374664141464968e+00,  2.938163982698783e+00);
        var d:Array = new Array (7.784695709041462e-03, 3.224671290700398e-01,
                               2.445134137142996e+00,  3.754408661907416e+00);
        // Define break-points.
        var plow:Number=0.02425;
        var phigh:Number=1-plow;
        // Rational approximation for lower region:
        if (p<plow) {
            var q:Number=Math.sqrt(-2*Math.log(p));
            return (((((c[0]*q+c[1])*q+c[2])*q+c[3])*q+c[4])*q+c[5]) /
                                                         ((((d[0]*q+d[1])*q+d[2])*q+d[3])*q+1);
        // Rational approximation for upper region:
        if (phigh<p) {
            q=Math.sqrt(-2*Math.log(1-p));
            return -(((((c[0]*q+c[1])*q+c[2])*q+c[3])*q+c[4])*q+c[5]) /
                                                                ((((d[0]*q+d[1])*q+d[2])*q+d[3])*q+1);
        // Rational approximation for central region:
        q=p-0.5;
        var r:Number=q*q;
        return (((((a[0]*r+a[1])*r+a[2])*r+a[3])*r+a[4])*r+a[5])*q /
                                     (((((b[0]*r+b[1])*r+b[2])*r+b[3])*r+b[4])*r+1);
    var n1:Number=NORMSINV(p)
    mathBtn.addEventListener(MouseEvent.CLICK, mathButtonClick, false, 0, true);
    function mathButtonClick(e:MouseEvent):void {
        T1.text = n1.toString()    //click the button and NaN displays
    Regards,
    saratogacoach

    I don't know the formula that you're trying to achieve, but the log and sqrt must use positive values.
    If you're uncertain if a variable (or formula result) will give you a negative result and you need a positive one, you can use the Math.abs, which return s always a positive value.
    I've just altered like this in the first IF:
    var q:Number=Math.sqrt(Math.abs(-2*Math.log(p)));
    and in the second:
    q=Math.sqrt(Math.abs(-2*Math.log(Math.abs(1-p))));
    In this case the second formula has two Math.abs since I don't know the result of "1-p" (in this case is negative) and then you multiply by "-2" wich will make the number negative again, so it has to be positive for the square root. If you have the change consider changing the formula to see you can eliminate, so many Math.abs, make it simple.
    Otherwise is just a question of predicting results and see if the formula fits right.

  • Using Table.Join formula takes extremly long time to get results.(Why Query Folding doesn't work?)

    Hi,
    I built a query with 4 tables inside (load from Oracle DB and two of them are quite big, more than millions of rows). After filtering, I tried to build relationships between tables using Table.Join formula. However, the process took extremly long time to
    bring out results (I ended the process after 15 mins' processing). There's a status bar kept updating while the query was processing, which is showed as  . I suppose
    this is because the query folding didn't working, so PQ had to load all the data to local memory first then do the opertion, instead of doing all the work on the source system side. Am I right? If yes, is there any ways to solve this issue?
    Thanks.
    Regards,
    Qilong 

    Hi Curt,
    Here's the query that I'm refering,
    let
        Source = Oracle.Database("reporting"),
        AOLOT_HISTS = Source{[Schema="GEN",Item="MVIEW$_AOLOT_HISTS"]}[Data],
        WORK_WEEK = Source{[Schema="GEN",Item="WORK_WEEK"]}[Data],
        DEVICES = Source{[Schema="GEN",Item="MVIEW$_DEVICES"]}[Data],
        AO_LOTS = Source{[Schema="GEN",Item="MVIEW$_AO_LOTS"]}[Data],
        Filter_WorkWeek = Table.SelectRows(WORK_WEEK, each ([WRWK_YEAR] = 2015) and (([WORK_WEEK] = 1) or ([WORK_WEEK] = 2) or ([WORK_WEEK] = 3))), 
        Filter_AlotHists = Table.SelectRows(AOLOT_HISTS, each ([STEP_NAME] = "BAKE" or [STEP_NAME] = "COLD TEST-IFLEX" or [STEP_NAME] = "COLD TEST-MFLEX") and ([OUT_QUANTITY] <> 0)),
        #"Added Custom" = Table.AddColumn(Filter_AlotHists, "Custom", each Table.SelectRows(Filter_WorkWeek, (table2Row) => [PROCESS_END_TIME] >= table2Row[WRWK_START_DATE] and [PROCESS_END_TIME] <= table2Row[WRWK_END_DATE])),
        #"Expand Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"WRWK_YEAR", "WORK_WEEK", "WRWK_START_DATE", "WRWK_END_DATE"}, {"WRWK_YEAR", "WORK_WEEK",
    "WRWK_START_DATE", "WRWK_END_DATE"}),
        Filter_AolotHists_byWeek = Table.SelectRows(#"Expand Custom", each ([WORK_WEEK] <> null)),
        SelectColumns_AolotHists = Table.SelectColumns(Filter_AolotHists_byWeek,{"ALOT_NUMBER", "STEP_NAME", "PROCESS_START_TIME", "PROCESS_END_TIME", "START_QUANTITY", "OUT_QUANTITY", "REJECT_QUANTITY",
    "WRWK_FISCAL_YEAR", "WRWK_WORK_WEEK_NO"}),
        Filter_Devices= Table.SelectRows(DEVICES, each ([DEPARTMENT] = "TEST1")),
        SelectColumns_Devices = Table.SelectColumns(Filter_Devices,{"DEVC_NUMBER", "PCKG_CODE"}),
        Filter_AoLots = Table.SelectRows(AO_LOTS, each Text.Contains([DEVC_NUMBER], "MC09XS3400AFK") or Text.Contains([DEVC_NUMBER], "MC09XS3400AFKR2") or Text.Contains([DEVC_NUMBER], "MC10XS3412CHFK") or Text.Contains([DEVC_NUMBER],
    "MC10XS3412CHFKR2")),
        SelectColumns_AoLots = Table.SelectColumns(Filter_AoLots,{"ALOT_NUMBER", "DEVC_NUMBER", "TRACECODE", "WAFERLOTNUMBER"}),
        TableJoin = Table.Join(SelectColumns_AolotHists, "ALOT_NUMBER", Table.PrefixColumns(SelectColumns_AoLots, "AoLots"), "AoLots.ALOT_NUMBER"),
        TableJoin1 = Table.Join(TableJoin, "AoLots.DEVC_NUMBER", Table.PrefixColumns(SelectColumns_Devices, "Devices"), "Devices.DEVC_NUMBER")
    in
        TableJoin1
    Could you please give me some hints why it needs so long to process?
    Thanks.

  • Extracting a distinct list of values using the Index formula

    In Xcelsius, I am trying to retrieve a distinct list of values from data imported using the Reporting Services button.
    In the spreadsheet I am using the following formula:
    =INDEX($A2:$A831,MATCH(0,COUNTIF($B$2:B2,$A2:$A831),0))
    The above formula works correctly in Xcelsius, but when I select the preview button the values change to #N/A.
    Please could you advise on why this does not work?
    Many thanks,
    Natalie

    Hi Natalie,
    First, you have to be aware of the fact that Xcelsius "simulates" an Excel function. When you are in design mode, the actual "Excel" (MS code) functions are executed. But when you are in preview mode (or export to a swf), all Excel functions are simulated (Xcelsius code).
    The fact that your function works in design mode but not in preview/export may point to a bug.
    But there are also certain assumptions (to address speed/efficiency) on the Xcelsius code which may cause the preview to fail. One such assumption is that on the VLOOKUP function, Xcelsius does not recalculate formulas in the index column of the VLOOKUP table array - if the index column contains formulas, the index column will always remain in the initial state (will not dynamically recalculate).
    Also, not all features on a supported Excel function works. For example, array formulas are not supported.
    Bobby

  • What is the use of  fox formula in integrated planning

    what is the use of  fox formula in integrated planning

    Hi,
    just as a follow up - the FOX Extension Formula capability of the IP in BW is as others have mentioned - to help develop formulas to execute calculations during planning, forecasting, budgeting, etc. - it allows consultants, like myself, to develop these formulas without the help of an ABAP consultant - but creates ABAP programs behind the scenes.
    You can also use these ABAP programs separate from the IP component - once you create a FOX formula you can retrieve the ABAP program and then use it for other activities.
    With the FOX you can use variables in a formula, call another ABAP program, generate loops of data both master and transactional, allows IF, THEN statements, and a number of other activiities. There is a limit to the usefulness of the FOX formula process - you may find if the FOX formula is too complex or long that your process will run slowly during the calculations. If this is occurring you will need to debug your ABAP program to see if you can increaase the performance.
    Thanks and hope this helps, Pete

  • Replacement Path Problem (Use in Local Formula or CKF?)

    Hello BW Experts,
    I have a couple of questions for a query I am currently working on that uses replacement path variables.
    I am looking to calculate the difference between 2 dates (u201Ctodays dateu201D u2013 u201Cstatistics dateu201D)
    The statistics date is a characteristic in the cube and for u201Ctodays dateu201D I am using a local formula using the SAP replacement path variable for todays date.
    Currently I am using the replacement path in a local formula in the columns of the query and this is fine when the reference characteristic is in the querry rows i.e statistics date.
    I believe the reference characteristic needs to be in the rows when using a formula variable replacement path in a local formula in the columns as if I remove the u201Cstatistics dateu201D from the rows the replacement path does not work.
    The actual query specification requires the u201Cstatistics dateu201D to be a u201Cfree characteristicu201D not part of the rows so the replacement path using a local formula will not work if the u201Cstatistics dateu201D is in the u201Cfree characteristicsu201D
    I have also tried using a CKF and using the same formula variable in this but it still did not work with the u201Cstatistics dateu201D in the rows?
    Do you know of any solution?
    Also could somebody explain what "Characteristic Reference (Constant 1)" means?
    Thanks in advance..
    Steve

    Hi Steve,
    I think you are right in infering that the replacement path wouldnt work if you didnt have the reference characteristic key in the rows to enable the replacement.
    I think, the solution for you could be Virtual Characteritic.
    Have you already thought about this?
    I am not aware about the characteristic reference(constant).
    Regards,
    Sunmit.

  • How do I insert the date to be continuous but not have the current time inserted using the NOW Formula?

    I am using the NOW formula to have the current dated inserted when ever I open my sheet, but I can not figure out how to keep the current time from also being added.

    Thank you, but I tried that.  This cell formating seems to only work when the cell contains only the formula.  I have text included in my formula, so the formating does not allow for it. It reverts to the default and as you see it wont even let you change the date format.

  • Using An Array Formula within a Pivot Table

    Hello Everyone!
    I've discovered a problem with using the Pivot Table. I wish to add this array formula for Counting Distinct names into a Pivot Table, but within Power Query for Excel 2013, it won't allow me to add an array formula. I need to use slicers for filtering city
    names which I'm not able to with this new restriction. 
    For example, suppose I wish to get (using a slicer) a distinct count of city names in a particular year using the year slicer. I cannot do this as I am not allowed to use array formulas within the Pivot Table which contains names of cities according to years.
    If I use the array formula for counting distinct city names outside the Pivot Table, then I won't be able to use the year slicer in order to get a distinct count of names of cities.
    Is there a way around this problem and how may I be able to resolve it ??
    Appreciate your help. Thanks.
    The problem with being punctual is, there's nobody there to appreciate it !!!

    Hello Everyone!
    I've discovered a problem with using a Pivot Table. I wish to add an array formula for Counting Distinct names into a Pivot Table, but within Power Query for Excel 2013, it won't allow me to add an array formula. I need to use slicers for filtering city names
    which I'm not able to with this new restriction. 
    For example, suppose I wish to get (using a slicer) a distinct count of city names in a particular year using the year slicer. I cannot do this as I am not allowed to use array formulas within the Pivot Table which contains names of cities according to years.
    If I use the array formula for counting distinct city names outside the Pivot Table, then I won't be able to use the year slicer in order to get a distinct count of names of cities.
    Is there a way around this problem and how may I be able to resolve it ??
    Appreciate your help. Thanks.
    The problem with being punctual is, there's nobody there to appreciate it !!!

  • Is it possible to use a DateDiff formula within a single field?

    Post Author: EarthMover
    CA Forum: Formula
    I have a field that lists transaction times for the signing on and off of maintenance tickets.
    My problem is that since both the sign-on and the sign-off are in the same field, I don't have the
    option of using the DateDiff formula like I normally would ex: DateDiff ("Interval",startDatetime, endDateTime).
    Because the start-date and end-date are in the same field, the formula returns no value.  To combat this
    I believe that an IF/THEN/ELSE statement would work, if I made one for the start-date and one for the end-date.
    My transaction field is using a DateTime format ex: 10/28/2007  11:58:07.  I tried making the IF portion of the statement
    dependant on another field that tells me if they've signed off or on ex: ACDN or ACUP, both of these are examples of someone
    signing on to a ticket,  and signing off of a ticket results in: COMP.  Based on this information I believe it should be possible to create
    a conditional statement to return to the information I require. I've attached an example of what I see, at the bottom.
    I've only been using Crystal for a couple of weeks now, so I'm still learning, any help would be greatly appreciated.
    PROBLEM DESC TEXT    COND   TRANSACTION TIME
    NEED RAILING FIXED       ACUP    10/25/2007   12:43:16AM
    NEED RAILING FIXED       COMP   10/25/2007   2:35:22PM

    Post Author: yangster
    CA Forum: Formula
    well this is what i can think of off the top of my head to deal with your problemyou are going to need create a variable for both begin and end date and this will have to be evaluated at the group footer levelHere is the sample data i will be working withID     Condition  TimeABC  ACUP     10/25/2007ABC  COMP    10/26/2007DEF  ACUP      10/25/2007DEF  COMP     10/27/2007create a group on the unique id, this will seperate ABC from DEFnext create the formulas to strip out the begin and end dates@begin_date_init (place in group id header)whileprintingrecords;datetimevar begin_date := datetime(0000, 00, 00, 00, 00, 00)@begin_date_eval (place in detail section)whileprintingrecords;datetimevar begin_date;if left(condition, 2) = "AC" then begin_date := time@begin_date_display (place in group id footer)whileprintingrecords;datetimevar begin_date;begin_date;the end date is identical except the if statement will be if condition = COMP then end_date := timeafter you've dropped these formulas in their appropriate places in the reportsupress the detail and group header sectionsyou will see that you will see something along the lines ofABC  10/25/2007  10/26/2007DEF  10/25/2007   10/27/2007so its just a matter of creating a simple formula to calculate the diff between your 2 variables@date_diffdatediff("d", @begin_date_display, @end_date_display)this should do what you are trying to do, the layout may be different then you have pictured so you can play with it but its a starting pointswell i'm off to whistler for some R&R if this doesn't work i'm sure someone else here can try to help you figure out something that works

  • Moment type characteristic inobject used as a formula(101+511-512-101  )

    Hi All,
    Moment type characteristic inobject used as a formula
    My requirement is movement type used as a formula
    Movement types =  101+511-512-101  how  it is used ,
    Isnu2019t possible. Please give me solution.
    Thanks

    Sorry, your case is not clear at all : can you re-explain ?

  • Count the number of cells used in a formula

    Is it possible to count the number of cells used in a formula?
    For example the following formula: "=Tabel 1 :: D45+D8+F7"
    The answer needed is 3

    From your description, it appears you could use SUMIF to get the totals.
    It's not necessary to know the number of times a name appears in the list to determine the sum of the numbers in the cell to the right, but if you have a separate need for that count, then COUNTIF will do the job.
    As the names may appear in more than one column, you'll need to use one iteration of the formula for each pair of columns containing name and associated number. In your description, there are names in columns C and E, with associated values in D and F respectively, and all of these cells are in the same table (which I'll name Table 1). I would calculate the totals on a second table (Table 2) containing a list of all of the names in column A, starting at A2, the COUNT of times each name is listed in column B, and the sum of the values in cells immeditely to the right of each name in column C.
    Table 2::B2: =SUM(COUNTIF(Table 1::C,A),COUNTIF(Table 1::E,A))
    Table 2::C2: =SUM(SUMIF(Table 1 :: C,A,Table 1 :: D),SUMIF(Table 1 :: E,A,Table 1 :: F))
    Select cells B2 and C2, then fill the formulas down each column.
    Regards,
    Barry

  • Can you really use Display String formula to test for NULL

    I am trying to manipulate the Display String of a field throught the Format Editor.  If a field is null, it should display "N/A", or "No data given", or anything else appropriate I might choose.
    I can't get this feature to work and I'm wondering if there's a bug here.  I'm using the following formula:
    if (isnull() or    trim() = "")
    then "N/A"
        else
    Am I doing something wrong or is there a better way to do this?

    Hi Adriane
    The other way to display "N/A", or "No data given" if a field is null is using a formula with if -else statement as follows:
    whileprinting records;
    if (isnull() or trim () =" ")
    then "N/A"
    else
    Please let me know if this helps.
    Thanks
    Poonam Thorat

  • How to use a single formula in multiple crosstabs

    Hi, I have 2 crosstabs, each in separate subreports, which are both combined into my overall report.  I'm formatting the background color of a field in each crosstab using a background color formula in each crosstab.
    I'm applying the formula by right-clicking the field, selecting "Format Field," selecting the "Border" tab, then clicking the formula button next to "Background."
    This works fine.  However, both crosstabs use the same exact formula, so I must change it in two places every time.  Is there a way to write the formula once, and use it in each crosstab?
    I tried just creating a new formula from the Field Explorer and calling it in each crosstab, but I'm using "currentfieldvalue" in my formulas, and I got an error saying the function could only be used in field formatting formulas.
    Crystal Reports XI
    Thanks!

    Hi..
    You are using two sub reports in one report, I don't think we can have a single formula to apply on a diffrent cross tab reports.  As you said you are using CurrentFieldValue in your formula, this can be used only in cross tab field format.
    You have to write separate  formulas for your two cross tab  reports
    Thanks,
    Sastry

  • Using a subreport formula in a main report formula

    Hello,
    I am trying to use a formula that is in the subreport and also a formula that is in my main report to come up with a percentage.
    ve researched the forums on the internet and couldn't find anything that directly fit my situation.
    - Formula #1: The SubReport formula is the "sum" of a number variable of {JobRecord.ProjectedIssueDate}. This is for the actual amount of job issued.
    - Formula # 2: The MainReport formula is the "sum" of a number variable of {JobHours.StartDate}. This is for the actual amount of jobs completed.
    Issue: I need to create a formula to take the Formula # 1 and Formula # 2 and get a percentage.
    Example:
    9 Jobs Completed in Main Report / 10 Jobs Projected in Sub Report = 90%
    My main report is grouped as follows for both the main and sub report:
    Grouping #1: Start Date
    Grouping #2: Contractor Code
    Grouping #3: Job Type Code
    I need this formula to work on the Grouping # 3 Level.
    Any takers?

    Also, If you want the Percentage and Sum from the Subreport to show beside each other, here's what you need to do:
    1) Create a new Group header 3b section
    2) Move everything except the Subreport on the Group Header 3b section
    3) Get inside the Subreport and suppress all sections of the Subreport
    4) Back in the Main Report reduce the size of this Subreport and make this no bigger than a dot. Reduce the size of the section so it doesn't take up a lot of space.
    5) Create a formula with this code:
    shared numbervar cnt;
    Drag and drop this formula on the Group header 3b so that this shows the sum from the Subreport.
    -Abhilash

  • Variable used in FOx formula should get value from user

    Hi Gurus,
    In my fox formula I want to multiply a keyfigure (say quantity) with a factor. For example if the factor is 10 then all records should get multiplied by 10.
    But the requirement is user shpuld be able to give the factor that should be multiplied. That is the l_factor used in the fox function should be a variable which gets value from user. I know we can give variables in filter and planning functions in IP. But can we give values in Fox formula.
    I would really appreciate the time and effort.
    Thanking you,
    Jerry Jerome

    Hello,
    May be you can try this solution.
    I think you have create a dummy character info-object(Z_Number) of same data type interget number.Create variable for Z_Number and restrict in filter(ZV_NUM).
    DATA Z_MAT TYPE 0Material.
    DATA Z_NUM TYPE Z_NUMBER.
    DATA Z_NUM_READ TYPE I.(Declate same as data type for Z_Number)
    Z_NUM = VARV(ZV_NUM).
    FORACH Z_MAT.
    Z_NUM_READ = Z_NUM.
    {Z_KF1,Z_MAT} = Z_NUM_READ * {Z_KF1,Z_MAT}.
    ENDFOR.

Maybe you are looking for

  • Open intercompany purchase orders

    hi need standard report to show open intercompany purchase orders as well as open sales orders Regards Vishal

  • Triggering SRM PO output to windows spool

    Hi, I have a customer requirement to output the SRM PO to the user windows default printer. Customer do not want to configure printers through SPAD transaction... Customer do not want to display PO in PDF and then to print it to windows printer. Cust

  • Viewing photo thumbnails in an event is there a way to display file info?

    Hi, When viewing photo thumbnails in an open event is there a way to set the program display file info like filename and date under each thumbnail? Right now I have to look at the bottom left info pane and highlite each thumbnail to compare file date

  • AXIS vs. JWSDP ?

    Hello, While I might be an experienced Java developer, I am going CRAZY trying to figure out all of these web service paradigms and acronyms. Specifically, I have yet to find a whitepaper that explains the differences between: Axis2 Java WSDP 2.0 Can

  • Wi-fi N/A what can/should i do to did it??

    ???