Boolean expression for calculation problem

Hi experts,
I have following Keyfigures arranged in my Report:
A  | B | AB | C | D | CD
*A,B,C,D are key figures in column
Now the user has demanded that they want to see only positive numbers in that Report and add all negative numbers in one column
Desired:
A (Only More than 0) | B (Only More than 0) | AB | C (Only More than 0) | D  (Only more than 0) | CD | ABC+D(where A,B,C,D are less than 0) * -1
I know I have to do it using formula and boolean expression but dont know how.

Create new Calculated KFs using Boolean operators  and hide original KFs.
(A > 0) * A
(B > 0) *B ....
Similarly others 
((ABCD) <0)*(ABCD)  for -ve values
Jaya

Similar Messages

  • Errors trying to apply a Boolean expression for conditional text

    I have been trying to create some Boolean expressions to filter conditional text, with mixed results. The Boolean expression is three conditions separated by ORs followed by four conditions preceded by AND NOTs. When I apply the expression, FrameMaker exhibits and error and has to quit. The numbers in the error message are:
    9004, 4908044, 6134440, 5459515
    The hidden log file appears to be nothing more than a stack dump.
    Do the numbers listed above indicate anything?
    Are there any known limitations on how long a Boolean expression can or should be? One expression with one fewer OR worked.
    Does there need to be a space between an AND and a NOT? The builder does add one, so I assume it is not necessary.
    Does anyone have some general rules of thumb when working with Boolean expressions for conditional text?
    Thanks,
    Van

    Van,
    The error values are meaningless to users. However, please do send the logfiles to the [email protected] address.
    As far as conditionals go, the general rules are that conditon names must be quoted and that if your ar using the NOT, it must run together with the AND or OR, e.g. ANDNOT ORNOT.
    There's an articel in the Developer Connection on using the boolean operators at http://www.adobe.com/devnet/framemaker/articles/fm8_single_sourcing.html
    Perhaps if you posted the condition that caused the crash, someone might be able to spot an error.

  • Multilingual Expression for Calculated fields

    Hi all,
    I need to write an expression for a multilingual Calculated field.(The calculation need to take the logon language into consideration). When looging onto the Console however and selecting languages the set languages are not auto selected as it does for Validations. The only fields available for selection is the Primary language fields.
    Is their a way to create a multilingual Expression for Calculated fields and how can I go about it?
    Thanking You
    Chris Huggett

    Hello Chris
    That functionality is not supported in SAP MDM 7.1(5.5)
    You cannot modify from validation filed values by language different than your connection language.
    You can do it manually in Data Manager or during import.
    As usually you can use MDM API for that activity.
    Regards
    Kanstantsin Chernichenka

  • Create and save boolean expressions for later evaluation

    Is it possible to create Boolean expressions by inputs via user interface in LabVIEW and save them for later evaluation? I am interested in creating a 'flexible policy engine' which involves creating 'rules' comprising attribute values of certain attributes of objects based on boolean expressions which can later be used for arriving at some decisions based on the 'rules'.

    Hi Belur,
    Have you considered building a script based on the boolean expressions that you want to create for the flexible policy and saving the script to file?
    Later, you can read the script and depending on the policy, it can re-create the boolean expressions.
    A simple way to implement this is by having various pre-defined expressions places into a Case Statement. The script calls the appropriate cases that create the complete expression.
    You can store the attributes of the objects and when the vi is running, it can first open the initialization file, read the attributes and set them.
    For instance, you can read from and write to Property (and Invoke Nodes) to which you can the attributes.
    Unfortunately, I don't have an example of this that I c
    an share with you. There may be some if you do a search.
    Hope this helps..
    JLV

  • Boolean Expression for PS- Substitution

    Hi,
    I need a help with substitution:
    I need to copy location (PRPS-STORT)  at level-2  WBS element to level 3 &4 WBS elements using substitution. i.e, whatever value of STORT is there at level 2 should be copied to level 3 &4 without manual entry. What Boolean expression can make it possible?
    I am able to define 'Prerequisite' RCJ_PRPSUP-STUFE = '2' AND RCJ_PRPSUP-STORT = 01 and then for 'Sustitution' PRPS-STORT = '01'. This way I can achieve the purpose, if steps are created for each STUFE and STORT separately. But I  guess this is not the right / economical way of doing substitution.
    Any better methods, please ?!!!
    Murali

    Try this:
    Pre-req: Level (PRPS-STUFE) >= '3'
    Substitute: Location Field RCJ_PRPSUP-STORT
    Regards
    Sreenivas

  • BOOLEAN expression for fluctuating signal

    I want to create a BOOLEAN expression to return a TRUE for a signal that is increasing and FALSE for a signal that is decreasing. Any idea how this can be done?

    Assuming you use a while loop, you just check the iteration terminal. Presumably you can calculate how many points are in your 20 periods worth of data.
    You can also use a FOR loop and feed it an autoindexed array of 20 periods. Attached is a quick example (LAbVIEW 7.1).
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    ShowDirection.vi ‏36 KB

  • Boolean Expression for get date

    Hi Experts,
    I am working boolean expression in ssis package. I want download files from ftp and the file name is mic_20141101-mi.txt. 
    I want to take yesterday files for that i am using expression but i want to give dynamic date which i want give in variable the specific date to download those files from FTP.
    For this process i am using Boolean Expression if i give the specific date in variable then its download specific date files from ftp or else its download yesterday files.
    Pls help to me for this scenario.
    Raj.

    You need to have a variable inside SSIS through which you pass the date value
    Once passed you can have a script task inside your package to check for the pattern of date variable value inside your file to select correct files
    see this for similar logic where i'm looking for files from current day
    http://visakhm.blogspot.in/2012/05/package-to-implement-daily-processing.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • ADF Groovy Expression for calculation

    Hi,
    I am using JDeveloper 11gR2. For a transcient attribute in a VO, I must add an expression that will calculate and return a value according to a business rule.
    I.e. if 'Standard' then column a * 0.3 or column b * 0.3
               elsif 'Premium' then column c * 0.3
               else 'Luxury' then column d * 0.3 Of course, using the appropriate Groovy expression. Does anyone have an example I could try?
    Thanks!
    Edited by: user545194 on 02.02.2013 07:28

    for example if att is the attribute that you want to calculate and it depend on val attribute
    the groovy exp is done on att
    if(val=='Standard') return a * 0.3
    else if(val=='Premium') return c * 0.3
    else if(val=='Luxury') return d * 0.3
    you must add attribute val, a, c ,d to the dependent attribute
    hope it helps
    Fakhri

  • Dynamic boolean expression evaluation

    Hey everyone,
    We have a table that consists of a couple key columns and a column containing a boolean expression. We want to select a number of rows based on the key columns and evaluate the boolean expression in the expression column for each, only returning the first row wherein the boolean expression evaluates to true.
    We are using a context to inject the test variables into the boolean expressions and currently we are selecting all the key rows in a PL/SQL procedure and going through the cursor evaluating each of the boolean expressions with an execute immediate.
    The expressions are currently formated in the columns as anonymous PL/SQL blocks that, when called, will either return true or false to the PL/SQL procedure. Upon returning true, the procedure stops looping and returns true to the caller.
    Psuedo-code would be:
    - set-up sys_context with condition variables
    - create cursor for: select * from expression_tbl et where <key matches>
    - begin loop through cursor
    - execute immediate cursor_row.expression using out :out_is_true
    - if out_is_true = 'Y' then return true
    - loop
    - return false
    The expressions (anonymous PL/SQL blocks) from the table look something like this:
    begin if ((''||sys_context('ctx', '1')||'' = 'FL') AND (''||sys_context('ctx', '3')||'' BETWEEN 1619 AND 4598) ) then :1 := 'Y'; end if; end;
    This works, but it seems like I should be able to do this another way and potentially extract more performance.
    So...a couple questions:
    1) I have read on ask Tom that a dynamic select statement (rather than an anonymous PL/SQL block) can evaulate the boolean expressions. I.E. rather than use an execute immediate clause on an anonymous PL/SQL block contained in the expression column, I would make the expression column compatible with a where clause and create this dynamic SQL query: 'select count(*) from dual where ' || expression. I would then execute that query and if it returns a row then the expression is true, otherwise it is false. My question is, does anyone think the performance of parsing the SQL and executing it would be better than that of executing an anonymous PL/SQL block for every row? Tom said that the SQL could incur a lot of hard-parses and kill performance, but how deathly is the constant compilation of anonymous PL/SQL blocks as shown above in comparison?
    2) Would there be any benefit to pulling the execute routines out of the PL/SQL block and issuing a query such as the following:
    select * from expression_tbl et where <key matches> AND pkg.eval_routine(et.expression) = 'Y' AND rownum <= 1.
    I realize that the evaulating routine would then need to either perform an execute immediate on et.expression (if we keep the current method in place) or formulate the dynamic SQL statement and execute it. But, could this be faster than doing the same loop through rows explicitely in PL/SQL?
    Doing this would trim my PL/SQL down to:
    - set up sys_context
    - execute the above select statmenet
    - if a row is returned then return true otherwise return false
    Seems more elegant, but the peformance is all that matters.
    3) Is there any built-in routine that I may be able to replace pkg.eval_routine from 2 with that would evaulate boolean expressions for me? Or any other way to inline the idea from 1 with 2? I can't think of one given the dynamic nature of the beast, but...maybe there's something I missed.
    Thanks everyone! Hopefully I've expressed myself clearly.

    Brian - According to Tom Kyte Doing PL/SQL inside Execute Immediate should be faster as you are already within the context of a PL/SQL engine. If we choose to do it in SQL then the PL/SQL engine has to hand it over to the SQL Engine for executing the dynamic Select statements and so might be a little slower. But I am not sure if the difference can be quantifiable unless u do your own test of both evaluators and run them for like a few thousand times in a loop.
    If you are using 10g R2 - you might want to look into DBMS_RLMGR package which is the API for the Oracle's version of the embedded business rule manager.
    I looked into it but it didn't fit our needs as its deficient with respect to rule versioning and effective and until date based business rule enforcement/ validation.
    After taking a shot at designing something home grown I feel its not that difficult to construct one that fit our needs inclusive of the features( rule versioning, effective and until dates) that I listed above as deficiencies in the Oracle embedded rule engine.
    If you don't have those requirements may be using the Business Rule manager API of 10g R2 might not be a bad anticipating it will be improved in future versions.
    Regards
    -Suren

  • Search problems : Boolean expressions and spam folder

    I get about 1000 spam per day that I have to check.
    Some of them contains certain keyword that the real emails would never have.
    I would like to setup a smart folder or similar that found all emails in the spam folder that contains any of those keywords. I read some blogs etc. that said that spotlight boolean expressions could be used but they do not seem to work.
    e.g. "pill OR berry" yields no results at all but when each of the keywords are used on their own they produce 80 or so results each.
    Another problem I have is that I can do a manual search in the spam folder by typing in the search field and it yields results. But if I save that as a smart folder it yields no results at all. It seems that the rules do not work on the spam folder.
    I then tried to do all this from spotlight in the finder. I found the folder where the spam mailbox emails are stored (called "messages"). I managed to construct a nice search query and save it as a search. But if I delete one of the emails from the finder it still remains in Mail and the next time I start Mail it will be regenerated from somewhere.
    Anyone have any insights to provide here?

    I had actually missed that preference. Unfortunately it did not help.
    Even if I make a new smart mailbox with just one rule (the email must be in the spam folder) it doesnt work. It doesn't matter if I change between any/all either.
    I started experimenting with adding a rule saying that the email must not be in any of the other mailboxes but spam. That seemed to work for a bit but as I added more rules, excluding more mailboxes, it eventually broke. I will investigate it a bit more but currently don't have high hopes...

  • Hi i got a new airport express for christmas and i set it up as per instructions ,i even give a static ip and wpa2 security ..the problem is is when i come to want to use it it says its not on my network and a orange triangle shows .when i reboot it works

    hi i got a new airport express for christmas and i set it up as per instructions ,i even give a static ip and wpa2 security ..the problem is is when i come to want to use it it says its not on my network and a orange triangle shows .when i reboot it works..then if i leave it a while and try iy agian its disapeared of my network...i have a bt hub 3 ....any help please ..im not sure if itsa faulty express

    I really don't have an answer for that one. I guess that while trying to get things working correctly, I would use the most basic monitor I had which in your case would be the Eizon using the Thunderbolt port and adaptor.
    When you boot into Safe Mode the startup is quite slow, but you should get the Apple logo and then the spinning gear below it (release the SHIFT key when it appears.) Then after a little more time you should see a gray progress bar appear below the spinning gear. When that disappears the computer will startup to a login screen.

  • Search MessageSelector sample for complex boolean express with AND, OR, NOT

    As far as I know I can specify in the "Message Selector" field of a JMS-PartnerLink
    a boolean expression.
    How are AND, OR and NOT written here? Can I use brackets?
    Can I use blanks inside the boolean expression?
    Assume I would like to specify:
    ((myfield1 > 3.0) && (myfield2 == 777)) || (myfield3 != 'aaa')
    Is the syntax correct for this?

    http://www.mcs.csueastbay.edu/support/oracle/doc/10.2/server.102/b14257/jm_create.htm
    11.3 JMS Point-to-Point Model Features/MessageSelector
    that will give you some examples of how to use it

  • Airport Express for AirTunes. Problems.

    I have a Windows XP computer and Laptop with a Linksys G wireless router in my house. Laptop connects to the router wirelessly and the desktop is hard connected to the router. Everyone is talking to each other nicely and I decided to invest an Airport Express for the sole purpose of playing itunes from my computer on speakers in another room.
    I bought the Airport Express and have had nothing but disaster. I don't want to use it to create another network, just to "join" my existing network. So the first thing I do is plug it in with only the speaker connection plugged in. I have not plugged in an Ethernet cable or anything else.
    According to the "manual" it is supposed to go solid yellow, blink and then go solid green. Because my home network is PW protected, I would have thought it could not "connect" to it on its own, but from just plugging it in to the wall outlet, I never get solid green, just flashing yellow, which apparently is bad.
    Anyways, I use the software (updated over the net of course) to set up and it is looking for a "base station" (which is confusing to me because I don't have an Apple base station, I have a linksys router and the stupid Airport Express box plugged into the wall). At any rate, it "finds" the Apple base station and appears to treat it as an unsecured Apple network, with some funny id. I do "manually configure" and I tell it I want to use it for AirTunes, and I don't want to create a new network, I want to join it to an existing network. I give it the SSID of my home network as well as the 64 bit encryption key (that is not autogenerated, but that I manually type in), and that's it.
    While I am able to get a message that it is ready to use (and I no longer see "Apple XXXX" as one of the available networks when I scan for available networks) the light on the Airport Express never stops blinking yellow, and it has done something to my home network because my laptop now is unable to keep a wireless connection to the router. I checked all my settings and they all seem to be ok, my desktop which is hard wired connects fine, but my laptop either won't connect at all, or connects and then drops. I have re-started everything including the router (not re-set, just unplug and plug back in) but my laptop now is totally not connecting and the Airport Express still doesn't work.
    Sorry for the rant, but any suggestions?

    Hello Birdman325. Welcome to the Apple Discussions!
    Because my home network is PW protected, I would have thought it could not "connect" to it on its own, but from just plugging it in to the wall outlet, I never get solid green, just flashing yellow, which apparently is bad.
    Not necessarily. A flashing amber status light generally indicates that the AirPort Express Base Station (AX) is not connected to a network. Since the default configuration of the AX is a wireless Internet router, the flashing status light would be normal.
    Anyways, I use the software (updated over the net of course) to set up and it is looking for a "base station" (which is confusing to me because I don't have an Apple base station, I have a linksys router and the stupid Airport Express box plugged into the wall).
    The AirPort utilities are specifically designed to work only with AirPort base stations, so it would be normal for it to try to "find" base stations.
    At any rate, it "finds" the Apple base station and appears to treat it as an unsecured Apple network, with some funny id.
    Again, normal. Remember the default configuration of a powered AX is a wireless Internet router ... since you don't have it connected to the Internet, the utility will find it as a stand-alone wireless network that is unsecured.
    While I am able to get a message that it is ready to use (and I no longer see "Apple XXXX" as one of the available networks when I scan for available networks) the light on the Airport Express never stops blinking yellow, and it has done something to my home network because my laptop now is unable to keep a wireless connection to the router.
    Let's double-check your AX's settings ...
    Perform a "factory default" reset of the AX
    o (ref: http://docs.info.apple.com/article.html?artnum=108044)
    To set up AirTunes on the AirPort Express Base Station (AX), either connect to the AX's wireless network or temporarily connect your computer directly (using an Ethernet cable) to the Ethernet port of the AX, and then, use the AirPort Admin Utility to check these settings:
    AirPort tab
    o Base Station Name: <whatever you wish or use the default>
    o Wireless Mode: Join an Existing Wireless Network (Wireless Client)
    o Wireless Network: <select the existing Linksys wireless network>
    Music tab
    o Enable AirTunes on this base station (checked)
    o Enable AirTunes over the Ethernet port (optional)
    o iTunes Speaker Name: <whatever you wish>
    o iTunes Speaker Password (optional)
    In iTunes:
    iTunes > Preferences... > Advanced > General
    o Look for remote speakers connected with AirTunes (checked)

  • MDX - function expects a string or numeric expression for the 1 argument. A tuple set expression was used.

    why this query
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    {([D Date].[Hierarchy].[Season].[2012 - 2013]),([D Date].[Hierarchy].[Season].[2013 - 2014])},
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    gives this error:
    Query (3, 3) The >= function expects a string or numeric expression for the 1 argument. A tuple set expression was used.
    while the following query works fine
    select [Measures].[F Events Count] on 0,
    Filter([D Actor Player].[Actor].children,
    ([Measures].[F Events Count],
    [D Date].[Hierarchy].[Season].[2012 - 2013],
    [D Result].[Result].&[Goal])
    >=5) on 1
    from [FBA Cube]
    why having set inside Filter's boolean expression generates that error? how can we
    keep the set inside the Filter's boolean expression but
    solve the problem? please explain the reason and solution

    Hi Butmah ,
    I think you should use an aggregation function with the set and the tuple ... adding an AdventureWorks snippet :
    select [Measures].[Order Count] on 0,
    Filter([Product].[Category].children,
    SUM({[Date].[Fiscal].[Fiscal Year].&[2011],[Date].[Fiscal].[Fiscal Year].&[2009]}
    ,([Measures].[Order Count],[Geography].[Geography].[Country].&[United States])
    >=5) on 1 
    from [Adventure Works]
    Regards, David .

  • Boolean Expression Parsing

    Hi
    i have a String like "true && !true && (false || true)" and want to know if the expression is true or false. Is there any Helperclass that parses an boolean expression??
    String expression = "true && !true && (false || true)";
    boolean result = BooleanParser.parse(expression );
    Regard,
    Harald

    thats not cheating, just the simplest way to solvethe problem ;)
    ... and one missed opportunity to learn something
    about parser generators.I think there is something to be said for taking classes on that particular subject.
    That particular study area is well defined in computer science is well defined. So the good ideas that one can use are already there just waiting to be learned.

Maybe you are looking for

  • Is there a posibility of creating a variable on Replacement path value?

    Hi all, We have 2 characteristics 1)Posting date 2)System Date, using Replacement path option i could create a formula saying No: of Days= System Date - Posting Date. Requirement has come in such a way that ,we want No:of Days in variable screen, so

  • Windows phone error code 80188301,. please need help

    i am getting an error while updating my windows phone.  windows phone error code 80188301,. please need help

  • Getting sound from macbook to work on HDTV

    Hi, I'm having problems getting sound from my macbook aluminum 13" to my tv. The tv is a Samsung R8 Series 37" LE37R87BD HD. i got picture up by running a dvi to hdmi to the tv. i have no problem with picture but i can't get any sound. I tried 3.5mm

  • Idoc getting stuck up in SM58

    Hi All, Previously we have created one outbound Idoc. we were passing data to external system via XI. it was successfully reaching to external system. now we have added one more segment to existing Idoc. after processing doc, in WE05 transaction, Ido

  • Unable to view schema objects in awm

    Hello, I am using an oracle 10g database (10.2.0.1.0). I have a schema with that roles : conect, resource, olap_user, olap_dba. I have created dimensions, indicators, etc.. in that schema with enterprise mgr console. I have created a worspace for tha