BEx Formula Use of 'Logical And' and Calculation for Gross Margin

HI Bex gurus.
Having an odd time with what should be a simple formula to handle the display of gross margin (GM). The goal here is to display GM% properly and the requirement is as follows
If GM <= 0 then 0.0
  Else
If GM > 0 and Sell > 0 then ( ( sell - cost /sell ) * 100 )
  Else
If GM >0 and Sell = 0 then 100
I am familiar with bex formulas and have referenced the help docs on booleans here -
Boolean Operators - SAP Business Explorer - SAP Library
But what is odd is that if I use a calculation or a CFK in the IF, THEN with a LOGICAL AND, the formula does not report correctly
If I put in a static value, like 77, the expected logic is followed.  I have tried making sure have extra parentheses and changing the order of the statement, to no avail!  I could use some extra brains on this puzzling matter, so you help is greatly appreciated and will award points!
Thanks
lee lewis
Here are the formulas in text and below screen shots.  Wish could copy and past formulas to and from editor!
GM%77
( ( ( 'Order GM' >0 ) AND ( Order Sell  >  0 ) ) == 1) * 77 + ( ( ( 'Order GM'> 0 ) AND ( Order Sell == 0 ) ) == 1) * 100 + ('Order GM' <= 0) *0.0
GM%
( ( ( 'Order GM' >0 ) AND ( Order Sell  >  0 ) ) == 1) * 'REF GM%' + ( ( ( 'Order GM' > 0 ) AND ( Order Sell == 0 ) ) == 1) * 100 + ('Order GM' <= 0) *0.0
'REF GM%
(order  sell - order cost /order sell ) * 100 )
GM%77
GM%

Shouldn't you change on of the brackets in your REF GM% ?
'REF GM%
(order  sell - order cost /order sell ) * 100 )
I would put that as
'REF GM%
(order  sell - order cost) /order sell  * 100 )
Not sure what you mean with those red arrows... but in both cases you would be dividing by 0 (order sell = 0).

Similar Messages

  • How to use my logic sessions and ilok at two places

    Hi there,
    I am wondering if I can use my Logic sessions and even my ilok plugins at two places, two countries?
    - but still keeping my ilok at one place.
    Is there any way via internet? perhaps using some kind of network server for my sessions
    - iDisk perhaps?
    what is the best solution?
    Thanks
    Message was edited by: Olavur
    Message was edited by: Olavur

    Buy a second iLok, and licenses for your software

  • Would like to use apex_item to popup a calculator for a text item field, is this possible in apex 4.2.2?

    would like to use apex_item to popup a calculator for a text item field, is this possible in apex 4.2.2?

    I imagine you could reverse engineer what APEX delivers when you declaratively choose text field with calculator.
    For example, the generated source includes an event:
    onclick="calculatorPopUp_p_t01();"
    These get added to the attributes of your apex_item.text() call.
    Alternatively you just paste the entire generated content, escaping the necessary data.

  • Bex Query- Use of ABAP code in Calculated Keyfigure/formula

    Dear Experts.
    I am wondering if there is any way to use ABAP in the formula editor of the Bex Query desinger.
    I have to build a report with very complex formulas (a lot of key figures, comporations, If then else ) an I think it would be easier to build all then in ABAP.
    So what I am looking for is any kind of user-exit/Badi that allows to calculate a Calculated Key figure/fomula in ABAP with the same data that is availabe in the fomula editor.
    If SAP is not providing this, this is clearlly a must for next releases.
    Thanks a lot and best regards,
    Alfonso.

    Dear Ananda.
    Thnaks for your reply, but could you please extend your answer a little bit more?
    As far as I know, Formula customer exit variables are only called once and they don´t provide the rest of the keyfigures and characteristic use in the drilldown level, so for my needs they are useless.
    Regarding IF-then-else statement in the formula, I already know about it. Actually what I am trying to avoid is to use them. In order to build my query I might need to build really big formulas with a lot of If-then-else, making it quite complex what the formula is doing. This is the reson I want to do it on ABAP.
    Please any other ideas?
    Thanks a lot.

  • I use Pro Logic 9 and see that to upgrade to Pro Logic X I need to buy the full package again. Does apple offer special conditions for their Apple clients ? Are users of apple care protection plan better served ?

    I use Pro Logic 9.1.8.  and see that to upgrade to Pro Logic X I need to buy the full package again. Does apple offer special conditions for their Apple clients ? Are users of apple care protection plan better served ?

    Old saying applies here most of the time......
    "If it ain't broken, don't fix it"
    I choose to use LP9 with Snow Leopard myself (10.6.8 and 9.1.6) for most of my commercial work simply because I find that combo very stable and provides the best overall performance for my setups here... but I am also using LPX with Mavericks as part of my client support and that works fine too although with a drop in performance due to the heavier demands made on the hardware by the newer OS X and LPX graphic routines for example..

  • What determines the price and tax calculation for consignment stock?

    Hi All,
    anyone knows how the price and tax are calculated for consignment stock? in other word, among the info record , contract or material master, what determines the price and the tax calculation for consignment stock?
    please advise, your input will be rewarded.
    thanks,

    First preceeding is taken by contract and then info records of consginment

  • BEx formula change not working in existing Analysis for Olap/Analysis for Excel reports

    Hello all,
    I posted this in Analysis for OLAP, but there has been no response so I'm hoping perhaps you BEx experts can help me.
    I had to modify a formula in a Bex query to have it calculate the results of the formula by summation.
    I checked the query using BEx Analyzer and it summed correctly.  If I create a new analysis for olap report, it sums correctly.
    If I modify an existing report, it does not pick up the change.  Existing Analysis for Excel reports also do not pick up the new summary calculation.
    Using the CMC, I edited the connection and reselected the Bex query, but that did not work either.
    Here it is working in the query:
    Line Discount is a formula with logic checking to see if "product list price total amount" is 0, set the line discount to 0; otherwise calculate it as "product list price total amount" - Net Sale.  So the total needs to sum of the line discounts (0+2820+2820 = 5640) and not be the Overall result "product list price total amount" - Overall Result "net sale" (13960-96720= -82760).
    Here it is in an existing Webi report - working:
    Here is what is happening in an existing Analysis for OLAP report - not working:
    I also tried to unselect Line Discount as a key figure from the existing report and reselect it, but that did not work.
    I'd like to find a solution so that all the reports that use this query won't have to be rewritten.
    I'm on BW 7.0 EP 1 SP 10 and BI 4.0 SP7 Patch 5.
    Thank you for your help,
    Susan

    Hi,
    Apply Exception aggregation on line discount formula--Exception aggregation as Total---Reference characteristic as Promega product.
    Make sure to refresh the webi report once after the changes has been done.
    If this does not work then you can apply summation calculation for that column at webi level as well.
    Regards,
    AL

  • Count and Percentile calculations for various Lines in BEx Query.

    Dear Experts
    I working on a BEx Query at the moment and the output is required in the format below:
    This and another report (which will be displayed above this report) will go into a WAD eventually.
    I have Key Figure for 'Document Count' but not sure how to get the percentage displayed in the second line and also for the Top 3 Reason Codes (not having anything displayed across 'Top 3 Reason Codes' though). I have tried Selection and other ways but nothing worked so far.
    Do I have to use Cell Editing by any chance or is there a way to work-around this.
    Thanks in advance for your help.
    Kind regards,
    Chandu

    You can achieve your report format by creating a Structure in rows with Cell definitions. Define each cell in COunt Document KF according to the row logic.

  • Im looking for the cheapest and smallest transport control surface to use with logic 9(and X when i upgrade my lappy). usb.

    Ive seen the presonus faderport but there looks to be lots of problems? is this still the case or has it been fixed?
    Or have you any info on godens...if there even is?
    cheers.x

    If I could make a suggestion. I too have the Axiom49 and love it. I would not get rid of it. But for control of Logic, I use the Presonus FaderPort. It works flawlessly. Plug it into a USB port, add the Mackie HUI controller in the preferences, set the input and output (of that control surface) to the FaderPort, and your done. Motorized fader, limitless pan knob, etc. You may want to look into this little gem. It will be less expensive than a new MIDI controller, that's for sure.
    Peter

  • Bex Formula using customer Exit

    Dear Friends,
    I am trying to resolve the below problem. Require your help.
    In one of the bex reports, the requirement is to provide a variable on Bill date. From the given bill date, the report should display data for 7 consecutive days.
    But the condition is that the from date should always be a saturday?
    What i have done is : In ROWS, i selected the required key figure columns
    and then, created a structure in which i created Seven New Selections and used offsets.
    so, if the user enters a specific date, the report displays seven days of the data from the given date. However, how do i restrict the user's choice to only saturdays.
    I suppose the solution lies in using customer Exit.. but could some one help me with the ABAP coding.
    I am also available on [email protected]
    Thanks for the anticipated support.

    Hi,
    You can get the Day from the current system date and put a case statement to substract 1 for sunday to get saturday
    2 for monday
    3 for tuesday
    etc
    Fuction Module : DATE_TO_DAY
    Can check this link : FM: DATE_TO_DAY

  • Use of Logical Systems -  Compliance Cal +ve's and -ve's

    Hello
    We are looking at setting up a logical system to connect all our various systems to CC.....  rather than entering each system individually in each of the functions.
    Does anyone have any experience they can share with regards to use of logical systems?
    I can only see positives - given that you add a Logical system once to a Function and then when a new system comes along, you just update the Logical System.
    However I am interested to hear what do you think of using of logical systems and if there are any downsides?
    Thanks

    I always use LOGICAL connectors as this allows you to more easily manipulate the ruleset and teh systems that it is connected to.

  • Goods Receipt PO+VOlume and Weight Calculation

    Hello experts
    i have a GRPO with 10 items in lines. as far as i can see, there are missing in some of the the value for the Weight and the Volume. while checking the Item Master Data form, the volume and the weight are filled up with specific value.
    could you please inform me the reason this document(GRPO)  has not filled these values for specific items?
    also, by clicking the Vlolume and Weight calculation, for these items the the volume is filled and the weight is not.
    it is strange i suppose.
    what i have found out is that in a Purchase Order, some of the items do not have a Volume or/and Weight because the BP does not have the values noticed to us and these fields are editing in item master data afterwards
    By using the System information under the VIew, i can see that the VOlume and Weight Calculation gets data from INV1 table
    Edited by: Fasolis Vasilios on Jan 10, 2012 10:56 AM

    Hi,
    The reason is simple: those value can not be copied if the Item Master was ready when you created the PO. However, PO wont automatically updated when you updated Item master. It stays in the old Item setting. That would be copied to GRPO from the old PO.
    Thanks,
    Gordon

  • LSMW - source file from Logical Path and Files?

    Hi,
    When specifing the source file (legacy data) you want to use to load from - you can choose a file from the application server.
    For the application server file does anyone know is there anyway that you can use a logical path and file to represent this source file?
    I do not see this option in LSMW and am surprised at this as it necessitates changing the LSMW in each target system.
    Thanks in advance.
    Kind regards,
    Mark

    Hi,
    When specifing the source file (legacy data) you want to use to load from - you can choose a file from the application server.
    For the application server file does anyone know is there anyway that you can use a logical path and file to represent this source file?
    I do not see this option in LSMW and am surprised at this as it necessitates changing the LSMW in each target system.
    Thanks in advance.
    Kind regards,
    Mark

  • FA:- stop the crete accounting and Depreciation calculation

    Hi All
    I am trying to stop the crete accounting and Depreciation calculation for some selected Assets in R12 can any one tell us is this possible if yes than how can we do it.
    Regards
    Ajay sharma

    Hi,
    you can stop the depreciation calculation for a particular asset by unchecking the depreciate check box in that Asset
    Regards
    Muthu

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

Maybe you are looking for

  • Time_out error in EKBE selection

    Time_out Dump error is coming while selecting fields from EKBE. in Where condition, 2 primary keys GJAHR and BELNR have been used. Whether I should go for creating new seconday indices or not?

  • Flash Player Failure (CRASHING BROWSERS)

    Im using Chrome & Safari Everytime Chrome & Safari crash (Chrome Gets to 176,000k{s}) (Safari gets to 250,000k{s}) Ive used this fourm before, ive submitted bug request, but nothing is resolved. it aint "Video Playback Issues" as said before. Please

  • Horrible Problem!!

    Hey out there. Before we start I like to give out my comp. stats so ya'll know what i'm working with: COMP: Dual 2GHZ Power PC G5 Tower/OS X(10.4.8)/1 GB DDR ram/150+ gigs HD GRAPHICS CARD: ATI Radeon 9800 128 MB PRO Mac Edition MONITOR: 17 Inch Appl

  • Implement custom fault handling in bpel

    Hi, Can you please provide some link on how to implement custom fault handling in bpel Thanks, kpr

  • Clickable phone number in excel

    Is it possible to make the phone numbers in an excel spreadsheet a clickable link so that they dial on the iPhone?  I have a spreadsheet full of business contact info, want to be able to just click on the phone number and place a call.