Replacing Negative results with Zero in a Query

Hi,
In my query i need to calculate the delay in payment.I have calculated the delay using CKF and Formula Variables.But few of the values are negative as the payment was made before the due date.
Is there an option were i can replace only the negative values with a Zero?
Do help me with the steps.
Thanks,
Savitha

Hi
Hide the calculated Keyfigure and create  a new formula.
In the new formula create the condition
CKF > = 0 * CKF + 0
This means that if the calculated Keyfigure which has the values Gt or Equal to 0 will display the actual value in Calculated Keyfigure and if it is less than 0 then it will Display 0. So Negative values will be o.
Regards
M.A

Similar Messages

  • How to replace blank spaces with zero's in the report

    hai sdn guys,
                         we have a requirement where we cannot have any blank fields in the report and i need to replace the blanks with a zero. What is the best way to do it.

    Hi Sunitha,
    It is not proper that you are posting the same question multiple times:
    Re: report o/p should not have blank spaces in - in case of no value
    should get 0's in place of blank value in  the output of the report
    That too inspite of my requesting you not to do so.
    I am not sure if you have ever gone through the Rules Of Engagement which are prominently posted in each forum, but I think it is SDN courtesy to provide proper feedback when posting a question and assign points as deemed fit. This helps (and motivates) everyone to work on your problem and try to give you a solution. I hope you will be more careful in the future. Thanks!

  • ParseDouble pads result with zero

    I am trying to work around an issue with generating a double value from a String, but the result for a value < 1.0 seems to be padded with a trailing zero. For example, ".009" or "0.009" are both parsed to a double of 0.0090. The result is not acceptable as it has an incorrect number of decimal places. All of this is resulting from methods to round a double value to the correct number of places, only to have parseDouble on that String add another digit. This only is a problem for values < 1.0. "1.009" for example will parse correctly to 1.009 This seems to be a bug in Double.parseDouble and/or Double.valueOf in 1.5.x and 1.6.x?

    JayBurrill wrote:
    I am trying to work around an issue with generating a double value from a String, but the result for a value < 1.0 seems to be padded with a trailing zero. For example, ".009" or "0.009" are both parsed to a double of 0.0090. The result is not acceptable as it has an incorrect number of decimal places. All of this is resulting from methods to round a double value to the correct number of places, only to have parseDouble on that String add another digit. This only is a problem for values < 1.0. "1.009" for example will parse correctly to 1.009 This seems to be a bug in Double.parseDouble and/or Double.valueOf in 1.5.x and 1.6.x?parseDouble returns a double. A double doesn;t have a "trailing zero", it has a binary format specified by IEEE 754 IIRC. You are having issues with how you output the double as a String I suspect.

  • Items with  zero stock quantity show negative stock value in Stock reports

    When running Stock reports for controlling the stock value towards the GL accounts, some items appear with zero stock quantity, but the report still shows a stock value  (negative value in my case)
    How can this happen, and how can I correct this situation ?
    System parameters are :   negative stock is not allowed, Items with zero cost price not allowed. On item level average cost price method is used.
    P.K.Johnsen

    Hi Johnsen,
    I believe you have checked the" Manage Inventory by warehouse". I have noticed this issue in SAP B1 2005B but this is rectified in 2007B. The system behaves in this way as the system maintains item cost for the item for all warehouses and even if the stock is not present in the warehouse, the system would still show you a value for the same. Hope this helps. please search the forum. You'll find related threads.
    Thanks,
    Joseph

  • Script for Save Options- Save Query Results with document

    Hi,
    Is there any javascript for Save query results with document in save options? If so where can i find that?
    Thanks
    Kalai

    hi guys,
    I found the answer.The following example shows you how to save the results with the query
    section named “SalesQuery”.
    ActiveDocument.Sections["SalesQuery"].SaveResults=true

  • How to replace # or Not assigned with blank in BEx Query Output.

    Hi,
    While running the query through BEx Query desginer or Anlayser, I am getting # or Not assigned where there are no values.
    The requirement is to "Replace # or Not assigned with a blank" in the output.
    I want to know, is there any setting in BEx query desginer where we can do this. How to do this.
    Please share your inputs on this. Any inputs on this would be appreciated.
    Thanks,
    Naveen

    Check out SDN-thread: "Re: Remove 'Not assigned'" for more details
    Ideas from SDN research:
    "a solution i have used is to put each RKF column in a CKF colum then in each CKF use RKF + 0, the outcome is that your # should now be 0s, in the query properties you can set the option to display 0s as blank."
    "try to enter a text for the blank entry in the master data maintenance of the relevant objects and set the display option for the objects to 'text'."
    Threads:
    SDN: How to replace # or Not assigned with blank in BEx Query Output.
    SDN: Re: Remove 'Not assigned
    SDN: How to replace # or (Not assigned) with blank in BEx Query Output.
    SDN: Bex Analyzer : Text element system's table ?  
    SDN: change message in web application designer ["nonavailable" ->  136 of SAPLRRSV]
    SDN: Not Assigned ["Not Assigned -> 027 of SAPLRRSV]
    SDN: replacing '#'-sign for 'not assigned' in queries
    SDN: # in report when null in the cube
    SDN: How to replace '#' with blank when there is no value for a date field
    Edited by: Thomas Köpp on Sep 13, 2010 5:20 PM

  • In iWork 09, Numbers, how do I replace a formula with calculated results for a whole column?

    I have a rather large Numbers spreadsheet.  I have used a formula to create a new column of information.  I now want to replace the formula with the actual results calculated by that formula for each cell in that column, so that I can delete some of the other columns.  How do I do that?

    Copy the cells with the results, then select the destination cell, and use the menu item "Edit > Paste Values".
    You may want to paste to a different location in case you need the source data or formulas in the future.
    Regards,
    Wayne

  • Xcelsius with XMLA or XML Query Result Set

    Hi Experts,
    I want a direct connection from Xcelsius to my BW-Data. Because the new connection, coming with Fix Pack 2.1 is only avaiable for EHP 1 for NW 7.0 I tried to configure with XMLA and XML Query Result Set.
    This Document tells the necessary steps: How to integrate Xcelsius 2008 with SAP NetWeaver BI without Integration Kit.pdf.
    When I test my XML connection over http://<host>:<port>/TXmla/srvlet/TestXmla my Cubes will display.
    So I do a Webservice-Connection with WSDL-URL. At Input-Values there are some entries like CUBE_NAME, CATALOG_NAME...
    Output values arent avalible. How do I use these elements to show my Data in Xcelsius?
    My Problem with the XML Query Result Set Connection is, that when I Log On to VC the following error appears:
    You are not authorized to view the requested resource.
    So I get the authorisationobjects: S_DEVELOP and S_RS_COMP as describe in 'How To... Resolve Visual Composer Issues'.
    What values have I to enter by S_RS_COMP? And how can I enter my External Service in S_SERVICE. At the type WS the service isnt't avaiable.
    Regards,
    Jan

    To use XMLA web service you need a wrapper function build to convert the XMLA output to the Xcelsius format. There are some documents available in SDN on how to do this.
    You can use Live Office or Query as a Web service option to connect from Xcelsius to BW.
    S_RS_COMP is the query ID which you are trying to access, S_SERVICE you can either give * or try to set up authorization log and see the expected value.

  • Replace #Missing with zero

    Hi All,
    Is this possible to replace '#missing' with zero with in a FIX Command in Calculation Script.
    Thank you.
    tvmk

    The two ways to change this without distroying your database are
    1. create a dynamically calculated member (call it account_zeroed) that checks to see if the account is #missing and returns a zero
    Soemthing like IF(@ISMBR(myscenario) and Account ==#Missing)
    0
    Else
    Account
    ENDIF
    2. Handle this in excel like it should be. If the user wants numeric zeros and they are using the classic Add-in then to get a numeric zero use (0) as your missing replacement. If smartview then use #numericZero

  • Getting result with single query

    Hi,
    I'm using db 10.2.0.1.0
    I have a table emp_shift , with data like below
    EmpCode           Shift     Effdate            Default
    1                 SHFT1    02-jan-2012          N
    1                 SHFT2    04-jan-2012          Y
    1                 SHFT3    04-jan-2012          NSo if user inputs EmpCode and Effdate, based on that i've to take the latest record, with default = 'Y' (if any) else default 'N'
    Suppose
    Case 1 : Input Empcode:1 Date:10-jan-2012
    Then i should get the below record
    1                 SHFT2    04-jan-2012          YCase 2 : Input Empcode:1 Date:03-jan-2012
    Then i should get the below record
    1                 SHFT1    02-jan-2012          NI want this result with a single query, is this possible?
    Thanks
    Divya

    Hi Thank you both,
    I'm trying this process through forms. and my forms version is 6i.
    There where i'm trying the query with the cursor, i'm getting error
    Encountered the symbol Order when expecting one of the following
    .()...and my cursor is
    Cursor cur_shft(vemp Varchar2,vdate Varchar2) is Select ESM_SHIFT_TYPE
         from (Select ESM_SHIFT_TYPE from EMPLOYEE_SHIFT_MASTER
                   Where ESM_EMP_CODE = vemp
                   and ESM_EFF_DATE <= vdate
                   Order by ESM_EFF_DATE desc,Esm_Default desc)
                   Where rownum=1 ;Whats wrong?

  • Incorrect query results with conformResultsInUnitOfWork

    Hi,
    has anybody experienced this:
    Take two classes User and Group
    Group has a 1:n Mapping to User (attribute users)
    User has a 1:1 Mapping to User (attribute partner).
    Following query returns too many objects
    User user1 = someUserObject;
    ReadAllQuery readAllQuery = new ReadAllQuery(Group.class);
    Expression e = builder.anyOf("users").get("partner").equal(user1);
    readAllQuery.setSelectionCriteria(e);
    readAllQuery.conformResultsInUnitOfWork();
    Vector vector = (Vector) unitOfWork.executeQuery(readAllQuery);
    It returns
    - the correct Group object as determined from the sql query +
    - any other objects of the same class that are fully instantiated (users is instantiated and for each user, partner is instantiated), even if they don't conform to the expression.
    The same query works properly ;
    - without conformResults
    - or if the other objects are not fully instantiated

    Hi,
    we need an workaround badly and the support is moving at exactly the rate I feared it would.
    So I thought, since we only hit this bug with existing objects and we use conformResultsInUnitOfWork because we want to find the newly created objects, is there a way to get
    - the SQL Query results
    + any new objects that conform to the query
    We still might get new objects that don't conform to the query (this is the bug) but I'll worry about that later if it happens.
    My first attempt at a solution looks like this:
    1. turn off conformResults
    2. manually add all new objects that conform to the query
    I had to guess a little for 2, since I don't know what exactly toplink does to select the "conform" objects.
    private static List findConformNewObjects(UnitOfWork unitOfWork, ReadAllQuery query) {
    List result = new ArrayList();
    Class resultClass = query.getReferenceClass();
    Expression selectionCriteria = query.getSelectionCriteria();
    Enumeration enumeration;
    IdentityHashtable newObjectsCloneToOriginal = unitOfWork.getNewObjectsCloneToOriginal();
    if (newObjectsCloneToOriginal != null && newObjectsCloneToOriginal.size() > 0)
    enumeration = newObjectsCloneToOriginal.keys();
    while (enumeration.hasMoreElements())
    Object o = enumeration.nextElement();
    if (resultClass.isInstance(o))
    if (selectionCriteria != null && selectionCriteria.doesConform(o, unitOfWork, null, query.getInMemoryQueryIndirectionPolicy()))
    result.add(o);
    return result;
    Does this look OK to you? Is there a better way to do it?
    Ana

  • I've purchased numerous books through itunes and now I'm unable to open ibooks; I get a "book format error, delete and redownload" which I've done numerous times with negative results.

    I've purchased numerous books through the itunes store in which I was able to read.  Now I'm unable to open some of the ibooks that I've purchased, I get an error message...book formate error, delete and redownload, which I've done numerous times with negative results.  What are my options?

    within the receipt that Apple sent to you via email is a Report a Problem link. use that link to report your issue.
    also you could try a basic reset and see if that resolves your issue. hold down the Lock button & Home button at the same time for ~15 seconds, the iPad should then perform a reset.

  • Problems in query result with infoset and timedep infoobject

    Hi,
    I have the following situation:
    infoobject ZEMPLOYEE timedep
    Infocube 0C0_CCA_C11 (standard cost center/cost element postings)
    -> infoset with infoobject and infocube linked with outer join
    My query should show all active employees in one month without any posting in the infocube.
    My testdata looks like this:
    pernr date from    date to         cost center
    4711  01.01.1000 31.12.2002
    4711  01.01.2003 31.01.2009   400000
    4711  01.02.2009 31.12.9999
    That means the employee is only active between 01.01.2003 and 31.01.2009.
    I expect the following result in the query with key-date 31.01.2009:
    4711  01.01.2003 31.01.2009   400000
    I expect the following result in the query with key-date 01.02.2009:
    no result
    -> because the employee is not active anymore, I don't want to see him in the query.
    My query delivers the following result:
    4711  01.02.2009 31.12.9999
    The first and the last entry in master data is automatically created by the system.
    I tried to exclude the not active employees by selection over cost center in the filter (like cost center between 1 and 9999999, or exclude cost center #). But unfortunately the filter selection does not work, because obviously the attributes are not filled in the last entry.
    Is there anyone who can tell me how I can exclude the last entry in the master data in the query?
    Any help is much appreciated! Points will be assigned!
    best regards
    Chris

    HI,
    problem is that I can't use employe status in this case, beacuse for any reason the people don't use it.
    I have also tried with exceptions and conditions, but the attributes ar enot filled, so it seems that nothing works.
    Do you have any other suggestions?
    Thanks!
    best tregards
    Chris

  • MacBook shows only folder with ?. Replaced hard drive with same results.

    In the midst of some work the machine simply clicked and showed a folder with a ?. Would not restart. Replaced the drive with a new 7200 Seagate momemtum, 320GB, installed the software, and have the same problem with startup. A folder with a ? Connect another machine via firewire and looked at the MacBook drive and it showed the appropriate system folders. Then started the other computer from the MacBooks hard drive and that worked. So the drive appears healthy but we cannot get it started on its own. In Disk Utility the new drive is indicated as not owner enabled, whatever that means. It appears most Macs that work are, in fact, owner enabled. Anybody have a clue what might be going on here? We're thinking maybe the first drive had not failed and the problem lies elsewhere.

    As an FYI, here is the apparent solution. The original drive did fail. Because the disks were in Seattle and we were attempting to fix it in Dallas we connected via Firewire to a PowerPC machine and formatted the drive. That was the crucial error. the G4 did not give the appropriate Intel-based Mac formatting options. So we could look at the drive from the G4 and see everything was there, but the MacBook could not boot itself because it could not read the disk which was improperly formatted. The Genius bar in Seattle figured this out and reformatted the disk at no cost.
    All's well that ends well, but have Macs really become that complicated?

  • Show characteristic with zero figures in report

    Dear All,
    I have report as below:
    Material        Qty
    A                  0
    B                  10
    C                  5
    D                  0
    E                  2
    I want to filter Material with zero quantity.
    I've already try with condition Qty = 0, but the report will suppress zero value and
    return not applicable data found.
    How to make this happen?
    Appreciate for any kind of help. Thanks.
    Regards,
    Steph

    Yes Alice, I already try, but does not work
    By the way, the figure - Qty, already show "0" (not blank, because it's from calculation).
    Yesterday, I try to add a new CKF in query, add with "1" if the Qty return zero value.
    And then I set the condition to this new CKF to activate, if the result the same as "1".
    But it does not work either and return no appliable data found,
    because the report automatically suppres the zero when I show Qty to the report,
    although there is new CKF that return "1".
    Regards,
    Steph.
    Edited by: Steph on Nov 5, 2009 4:08 PM

Maybe you are looking for