Writing formula with boolean operators

Hi,
I need to write a formula that will, for a key figure, recognize if the cell is blank and if so convert it to zero. So for example,
if (keyfig = ' ') , then (keyfig = '0')
How do I do this using the boolean operators supplied to us for writing formulas and calculated key figures????
Thank you!

Hello CM,
Have a look at this:
http://help.sap.com/saphelp_nw04/helpdata/en/23/17f13a2f160f28e10000000a114084/content.htm
Please, remember to use the search option on this forum, as I think that a lot of threads already mention this.
Hope it helps,

Similar Messages

  • Before aggregation with boolean operators

    Hi gurus,
    does someone know if there is a way to force a bex formula, defined by a boolean operator, to be executed in "before aggregation" mode?
    For example, let A and B two propositions, and KF1 and . We define the following formula key figure 
    <b>(A) * KF1 + (B) * KF2</b>
    where (A) = 1 if A is true and (A) = 0 if A is false.
    My question is: is there a way to force this formula to act before aggregation.
    Thank you very much
    Matteo

    I cannot do that, because you can set "before aggregation" property only for KF that are built on basis KF. But I have to built my formula using boolean operators that are not basis KF.
    That's why i cannote use "before aggregation" in the properties of my KF.
    thank you
    matteo

  • How to write a formula using Boolean Operators?

    Dear BW mates,
    I have two Key Figures <b>stock</b> and <b>Prevous 12 week Stock</b>.
    I want to calculate <b>Excee stock</b> from these with the following condition.
    If <b>Prevous 12 week Stock</b>is less than <b>stock</b>then substract <b>Prevous 12 week Stock</b>from the <b>stock</b>. Thease substracted value is the <b>Excee stock</b>.
    Thanks,
    SB

    Hi Reddy,
    Create a formula 'a' as i said first or you can use
    (Stock-Prev. 12 week sale ) directly in Excess Stock
    formula.
    <b>Excess stock = ( Stock >Pre.12 week Sales )*(Stock-Prev. 12 week sale )</b> .
    Formula works like this:
    if Stock>Prev 12 weeks sales,
    Excess Stock =  1 * (stock - Prv 12 weeks sale) = stock - Prv 12 weeks sale
    if Stock is not greater than prev 12 week sale,
    Excess Stock = 0 * (Stock-Prev. 12 week sale )  = 0.
    have you got it?
    i assume Stock and Prev 12 week sale Keyfigures are of same units.
    thanks
    Message was edited by: Murali
    Message was edited by: Murali

  • Query Formula with boolean return values

    Hi,
    In my query, I have a  formula column which returns a boolean value 0 or 1. I need to add these values, but I cannot add them as boolean.  Is there a way that I could convert the boolean values to number/integer so I can add them?
    Thanks in advance
    Best Regards,
    Rose

    Hi Rose,
    please change 'Calaculate Result as' in properties of affected formula to 'Summation'.
    If this sould not help put formula in brackets and multiply by value 1 or create a new formula like
    (yourformula = 0 + yourformula = 1) * 1
    this should provide an integer.
    Regards
    Joe

  • Vector app with boolean operators

    not expecting much, I need some form of vector based (lines, plines, oval, squares etc...) that also has the ability to do basic boolean operations on those shapes, (addition/merging, subtraction, etc...). I would be sending these back to the main computer for more detailed work and conversion to graphic formats to use in programs, but want to work where I want to on the ipad and create the core shapes and drawings.
    Any suggestions would be great. I currently use an app called Touchdraw that does everything except the booleans, which would make my life a whole lot easier.
    Thanks
    Jason

    Fyi, eveloper of touch draw let me know at booleans are coming in a future update.

  • BEX Formula with IF

    Hello BI experts,
    I try to calculate a formula using boolean operators (IF, AND).
    When I execute the query, I had a message like this but I only use amount in EUR 
    So I've added NODIM in my formula but the result is displayed without EUR
    If I don't use NODIM, the result is displayed with strange unit : EUR^2
    Do you have any idea to display the result with EUR symbol?
    Thank you in advance
    Regards,
    Nicolas 

    Hi Nicolas,
    The Display of your Unit seems to be like EUR raised to powere 2 of EUR Square.
    I have not seen this type of Unit display. However, I think When you apply the NODIM, try to apply it only for the Net sales +Portfolio YTD Key figure and check if results displayed correctly.
    Hope this helps.
    -Swati.

  • Getting started with "Writing Formulas" ?

    Hello,
    I want to start with writing formulas,
    Can you guide me to the best way and basic documents...
    Regards

    Hi,
    Please review the following documents.
    Note: 223280.1 - Using Oracle FastFormula
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=223280.1
    Applications Releases 11i and 12 --> Look for "Oracle HRMS FastFormula User Guide" 11i/R12
    http://www.oracle.com/technology/documentation/applications.html
    Note: 218059.1 - Oracle FastFormula Reference Guide for Standard and Advanced Benefits
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=218059.1
    Note: 296833.1 - Troubleshooting Guide for Fast Formula Issues in Benefits
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=296833.1
    Regards,
    Hussein

  • Regular expressions with boolean connectives (AND, OR, NOT) in Java?

    I'd like to use regular expression patterns that are made up of simple regex patterns connected via AND, OR, or NOT operators, in order to do some keyword-style pattern matching.
    A pattern could look like this:
    (.*Is there.*) && (.*library.*) && !((.*badword.*) || (^$))
    Is there any Java regex library that allows these operators?
    I know that in principle these operators should be available, since Regular languages are closed under union, intersection, and complement.

    AND is implicit,
    xy -- means x AND yThat's not what I need, though, since this is just
    concatenation of a regex.
    Thus, /xy/ would not match the string "a y a x",
    because y precedes x.So it has to contain both x and y, but they could be
    in any order?
    You can't do that easily or generally.
    "x.*y|y.*x" wouldll work here, but obviously
    it will get ugly factorially fast as you add more
    terms.You got that right: AND means the regex operands can appear in any order.
    That's why I'm looking for some regex library that does all this ugly work for me. Again, from a theoretical point of view, it IS possible to express the described semantics of AND with regular expressions, although they will get rather obfuscated.
    Unless somebody has done something similar in java (e.g., for C++, there's Ragel: http://www.cs.queensu.ca/~thurston/ragel/) , I will probably use some finite-state-machine libraries and compile the complex regex's into automata (which can be minimized using well-defined operations on FSMs).
    >
    You'd probably just be better off doing multiple
    calls to matches() or whatever. Yes, that's another possibility, do the boolean operators in Java itself.
    Of course, if you
    really are just looking for literals, then you can
    just use str.contains(a) && !str.contains(b) &&
    (str.contains(c) || str.contains(d)). You don't
    seem to need regex--at least not from your example.OK, bad example, I do have "real" regexp's in there :)

  • Unable to attach formula with Element

    Hi All,
    I have written a formula with type Oracle Payroll that is 10% based on Basic pay and return a value in a variable,after writing I am unable to associate it with element , If I take the type element input validation it appears in the input value screen in the element window but when I take type Oracle payroll it does not appear ,kindly share your experiences
    Regards,

    Hi,
    A Oracle Payroll type Fast Formula can be attached to an Element using "Formula Results" window.
    Navigation : Total Compensation > Basic > Formula Results
    1. Select the Element to which you want to attach this Formula and click Find.
    2. In Processing Rules block, Select Name as "Standard" and then attach your formula in the "Formula" field.
    3. In Formula Results block, Select Name as the Return Variable you are returing in the Formula and then select "direct result" as Type.
    4. Select the input value of your element to which you want to pass this value.
    5. If you want to pass this value to another element. Then select "Indirect result" as Type, select that element and then select the input value of that element to
    which this variable value needs to be passed.
    6. To pass a value using Indirect result, the destination element should be non-recurring and with lesses priority (higher number).
    Hope this helps you.
    - Sri.
    Edited by: Sri81 on Nov 26, 2008 1:15 AM

  • XML Boolean Operators in fsiuser

    Hi All,
    We define BatchingByRecip batches in our fsiuser file, and we often write custom XPATH statements to use input data to send certain transactions to a certain recipient group. We've had good luck with very simple XPATH statements, such as:
    Batch_Recip_Def = !/Transaction/Confirm/CompanyInfo[CompanyCode='0002'];"BatchGroup1";Client
    However, we've recently had some requirements to add multiple conditions to these XPATH statements, and we haven't been able to get boolean operators to work. We're trying to do something like this:
    Batch_Recip_Def = !/Transaction/Confirm/CompanyInfo[((CompanyCode= '0001' or CompanyCode = '0003'))];"MINNESOTA";Client
    This seems like a reasonable requirement, but we haven't been able to get this to behave correctly. Has anyone been successful with something like this? Thanks for any help!

    You can mix DAL usage with this sort of rule like this:
    < BatchingByRecip >
    Batch_Recip_Def = =DAL("My_Script"); ... ; ...
    Basically, most places that accept a search mask of ?token or typically the xpath starting with ! will also accept the =DAL() or =GVM() type macro call. The "=" macro feature has a number of options like:
    =(expression) returns the value of a DAL symbol represented by "expression"
    =DAL(expression) returns the value of a DAL script named by "expression"
    =GVM(expression) returns the value of a GVM symbol named by the expression
    =@(expression) returns the value of a source field
    So, in the DAL script you can do whatever you need to do - write a complex IF with as many XPATHs as you need connected with AND or OR, etc, and be sure to return "TRUE" if you want this batch.
    Not sure how far back the equal sign macro feature goes, so if not in 11.3, my apologies in advance.

  • Implementing Boolean operators during find object for qualification

    Hi Team
    We would like to maintain requirements profiles for PD object (position,job etc.) in terms of qualifications (Q) using complicated boolean operators , for example :
    ((Q=English>4 OR (Q=French=5 and Q=Spanish>2)) OR (Q=German=6 and english<3) and Q=education # 2
    The complicated boolean operators could be also : range,excluded from the range,equal,not equal,not exits.
    We would like to execute the search for qualification ,profile matchup based on this complicated boolean requirments profile.
    Is there any custom development or configuration to make this happen ?
    Best Regards
    Dror

    Is this still true if the Collection generics elements are an interface type? For example, in the
    code I sent earlier, I have:
    /** The authorities granted to this account. */
    private Set<Authority> authorities;
    But Authority is an interface that is implemented by the DefaultAuthority class (maybe others
    eventually). I was under the impression that in this situation, the metadata does have to provide
    the actual type that will be in the collection.
    But even if it works in Kodo, one of the requirements of my project is that the JDO implementation
    be swapable with JPOX. When I started working on it, both Kodo and JPOX were at a much earlier stage
    of implementing JDO 2, and if I recall correctly, JPOX required the implementation class (though I
    don't know if it had to be fully qualified). I'm not sure that requirement has been removed from
    JPOX yet, though I haven't checked in a while.
    Thanks for your help with the default value settings though. Is there any place where I could have
    found that behavior documented (Kodo docs, JDO2 spec, etc.)?
    Mark
    Abe White wrote:
    p.s. You don't need to set the element-type in metadata if you're using
    Java 5 generics; we can get the element type from the field declaration.
    Also, when you do have to declare an element-type in metadata, you
    don't need to fully qualify the class name if the element class is in
    the same package as the field's owner (the current <package>), or in
    java.util, java.math, java.lang.

  • Aggregation Befre Calculation with Boolean Operator (BW3.5)

    Dear All,
      Here I am trying to create a 'Calculated Key Figure' with some logical expression to verify the value of other columns(ie: stock value = 0, market value = 0...etc) and I would like to calculate the result 'Before Aggregation'; Somehow, the calculated key figure with Boolean Operator can not be chosen as 'Before Aggregation'. I tried to create 2nd CKF to include the 1st CKF so that I am able to select the 2nd CKF as 'Before Aggregation', but the result just dont seem to be right.
      Any Idea to do this kinda calculation? Thanks a lot.
    B.R
    Charlie

    Instead of creating a calculated Key Figure, create a formula in the query and try whether it is giving a desired output??

  • 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.

  • Bex Formula with Condition - Creation

    Hello All,
    We need to create a formula, and the condistions are provided below.
    if (A > B) and
    if (C > (A - B)) then X = (A - B) * D
    else
    X = C * D
    else
    X = 0
    In Excel the formula is defined as,
    X = IF(A>B,IF(C>(A-B),(A-B)D,CD),0)
    Can someone provide the Bex solution for this?
    Kind regards,
    Edited by: Jith136 on Oct 6, 2011 1:44 PM

    HI ,
    You cannot use if condition in bex query designer.. instead try the same with Boolean operator in three new formulas ...
    formula1  (A > B .and. C > (A - B) ) (A - B) * D
    Formula2 (A<=B .and. c<(a-b))  C * D
    formula3  formula1+formula2...
    when you are creating formula on right pane you can see boolean operator use them to meet your requirement .. I don't have access to my server rit now so i am not able to check the same , if you feel to change operator accordingly. 
    Thanks
    BVR
    Edited by: binu v. rajan on Oct 6, 2011 6:00 PM

  • Check box with Boolean data type is not behaving properly

    Hi,
    I create a sample application with one entity driven view object with two attributes. One is of String data type [Value will be Y/N] and another (transient) attribute with Boolean data type. I planned to bind this boolean data type attribute to UI. I overridded the view row impl class and included setting of boolean attribute inside the setter of String attribute. Also in the getter of boolean attribute, added code to check the string attribute and return true/false based on that. Everything is working fine in application module tester. But when i test the same in view controller project in a page, it is not working. Always Check box component is not checked eventhough when i explicitly check it.
    [NOTE: I have given the control hint of Boolean attribute as check_box. Also i don't want selected/unselected entries in the page def file. That's why followed this approach]
    Have i missed out anything? Why this behaviour.
    Thanks in advance.
    Raguraman

    what is the value that is going in when u check it.. did u debug it.. is the viewRowimps setter and getter getting called.. and is it having the right value set and got.. and ur sure that ur using selectBooleanCheckBox..
    ur binding the checkbox to the transient value right??

Maybe you are looking for

  • After resizing a disc partition using disk utilities, I can no longer boot windows. HELP! what is the best thing that I can do to fix this

    Bare with me as Im no computer genius but ... This afternoon I wanted to create more disc space on my Windows partition as I am using CAD software and wanted to free up as much space as possible. So, I went into disk utility and reduced the size of t

  • Extreme (b/g/n) can't connect to the internet

    my iMac has no problem seeing my airport extreme (b/g/n), but I can't connect to the internet. I have tried soft / hard reset & factory reset as well, none of them worked. The extreme just keep flashing its amber light. On my iMac, I have full signal

  • Music tracks playing in random order!

    I am seeing a problem whereby album and/or playlist tracks are being played in random order. The problem is affecting both my iPhone and ipod Nano and seemed to start fairly simultaneously onboth devices. This isn't like using Shuffle - after listeni

  • Credit card processing?

    I tried to purchase a movie and was informed I needed to update my credit card information. I logged into my account, updated the information, and it keeps telling me "credit card processing temporarily unavaible, please try again later". This has be

  • Import excelsheet in HTMLDB 2.0 generates error:

    The file contains invalid file extension. No binary file types are supported. When I use the browse function the following file types are allowed: all files pictures (jpg, ...) html But no xls files? Any idea how this comes? Do help! Cheers Message w