Getting descrepency in the result row of the Query

Hi All,
I am executing a query which is having 4 Keyfigures and 2 formulas.
I am getting wrong result in the query for formulas.
Below is the query structure
           f1        f2         f2%f1       f3       f4            f4%f3
date
1
2
         792    408        51.78        9647    8403       88.57
All the keyfigures - result is set as total
Formula                - result -nothing is defined(under calculation tab)
The result I am expecting for column 3 is 408/792 = 51.51
The result I am expecting for column 6 is 8403/9647=87.10
To get the expecte result what changes i need to do to the formula.
Thanks
Jagadeesh

Hi Anand,
Thanks for your reply.
If i change it to summation, it will give me sum in the result row.
I am not looking for summation, i want percentage for (overall result F2/overall result F1).
Thanks
Jagadeesh

Similar Messages

  • Presenting/Selecting the "result rows" in a query

    Hi,
    Here is a description of my problem:
    I have a query which returns values for materials grouped by purchasing groups:
    Group 1 Material A KyeFigure
    Group 1 Material B KyeFigure
    Result:  KyeFigure       
    Group 2 Material C KyeFigure
    Group 2 Material D KyeFigure
    Result: KyeFigure
    I'm using a Web application designer chart to present the values graphically. I would like only to present the result rows in the chart, not item values. But since the chart picks all KFs presented in the table (items as well) this is not the case. I've tried to find a way in the chart-settings without any luck - it seems not possible. The documentation states that you're supposed to design your table the way you want it to show in the chart. However, I'm not allowed to redesign the cube or the report. It is not possible to drill up characteristics either (this affects the calculation).
    My question is: Is there a way to extract the result rows into a new table and then base my chart on that one or simply somehow present only the result rows in a chart?
    Best Regards
    /Daniel

    Hi Daniel,
    You can create the query view in BEx Analyzer. After you execute the query, use filters, drill downs etc to get to the exact "view" of data that you would like you chart to present. Save this query view. Then in your web template assign this query view as the data provider.
    Hope this helps...

  • How to hide the all rows except the result row in a report?

    Hi Experts,
    We have a report in which the user is interested to see only the result rows and I need to HIDE the characteristics in the rows. I was successfull in doing the same for Key figures in columns using "Calculate single value as suppress result". But I am not finding a way out to hide the characteristics in the rows.
    If I move the characteristics in rows to Free characteristics, the result row is not getting dispalyed. Also, the characteristics are  used dynamically by the formulae in columns and hence i cant remove these characteristics from the query. . The user wants the query to contain only one characteristic in the row and the result row for the key figures in columns. The report currently displays Invoice level data for each customer and this needs to be eliminated and it should display the summarised  data for every customer. Please suggest how this can be accomplished
    Regards,
    Kavitha

    Moving the char to free char will show the equivalent of result.
    Your issue likely is that this breaks the calculations since you do want the calculations done at detail level.
    To achieve this, move your char to free char (say it is 0CUSTOMER).
    For the CKF/Formula, go to aggregation tab, set the exception aggregation as Total (or whatever it was in standard behavior) and specify reference characteristic (in this case 0CUSTOMER), also check the 'Before aggregation' if you have that checkbox there.
    This will ensure the calculation is done at detail level even though the char is not included in the rows.
    If you have multiple chars to be moved to free char but included in detailed calculation, you will need to build cascading CKFs (CKF1 with ref char1, CKF2 eq to CKF1 with exception aggr on ref char2...and so on).
    Added:
    I understand you do want 0CUSTOMER in there, but something else (let us say 0DOCNO) removed. Use 0DOCNO in place of 0CUSTOMER in the case described above.
    Edited by: Ajay Das on Aug 5, 2009 8:57 AM

  • Result Row in the query output

    Hi,
    If I restrict a characteristic by hierarchy then I can’t have the result row displayed. If the hierarchy active is removed then the result row gets displayed. All characteristics are marked to show the result row.
    This characteristic is Account Number. If in the query definition I remove the restriction on account numbers and just select hierarchy active and the required hierarchy in the properties then I get the result row in the output. But now it also displays all the unassigned account numbers in a separate node “Not Assigned Account Number (s)”.
    I can’t even restrict it in the output with hierarchy active selected. When I do select filter value in the output the options Include in Selection and exclude from Selection are grayed out and hence can’t select it.
    Please advice on this issue…
    Thank you,
    sam

    Hi Jaya,
    I think you misunderstood my issue.
    My problem is not that i do not want to see the field. But instead, i do not want to see only the results row in the query output.
    I need to have the results to populate a calculation via sumct formula.
    My question is, can sumct be populated if i hide/supress RESULT row ?
    Regards,
    Maili

  • How to make the Results row a toggle when the user wants/does not want see

    The user wants to toggle between seeing/not seeing the Results row at the bottom of each row. How to make it like a toggle checkbox/selection on the screen so that the user can decide on seeing/not seeing it in the report. If not possible to do such a thing, then how do I totally prevent it from showing in the report. Version is 3.5 BW.
    Thanks
    Ram

    For each characteristics in the query designer, right-click and go to properties....
    then in the 'Display of Results' section in the 'Suppress Result Rows' option, select: "Always".
    This will suppress the result rows.
    Good luck,
    AT

  • Result Rows in a Query

    Hi
    I have sales org, channel, customer and material along with the key figures in the rows
    of the query. I am automatically getting result for each level by default and then the
    overall result. Is there a way in which i can change all the result rows with
    the corresponding text they belong to like the material result, customer result etc.
    Thanks
    Rashmi.

    Hi
    Not Sure, But try replacement path Variable (with Material Result...etc) and the ckf/Formula(total all the Material, channel...etc) for the same to appear the totals Row .
    /people/kamaljeet.kharbanda/blog/2006/12/28/bex-characteristic-variable-with-replacement-path
    Hope it helps and clear

  • Display only the result rows only by using condition or any other way

    Hello Everybody,
    I've a web report where I want to diplay ony the result rows and don't want to display the detail rows at all. I could hide the detail rows but these rows still appear without any value in the key figure fields.
    I tried to revove the characteristic field from the drilldown but it doesn't show the report correctly. Then I tried to write a condition to filter the detail rows but this condition doesn't apply to the result rows so this effort also didn't work for me.
    Is there anyway we can display the report with only the result rows ? I've already tried to find out a solution on SDN but couldn't get the solution eventhough I found many posts on this kind of requirement.
    Any help would be greatly appreciated.
    Thanks
    Alok

    Please explain when you say
    "I tried to remove the characteristic field from the drill down but it doesn't show the report correctly"
    What is problem there? What result do you get. If possible please provide  details of columns layout and few numbers

  • WAD result row in the name of the WAD report

    Hi,
    My requirement is we need to show summary of the result rows in front of WAD report output. Is it possible by any means please let me know.
    amit

    our requirement is top management should get summary report like this e.g
    WAD output as of now we have.
    > costing report (Heading of the report) (compress)
              > Query result  (at the top or at the bottom)
    I need Query result should appear at top level before clicking on heading costing report.
    Please let me know if anything required above.
    amit

  • ORA-30926: unable to get a stable set of rows in the source  table

    When user are trying to open a form getting below error.
    com.retek.platform.exception.RetekUnknownSystemException:ORA-30926: unable to get a stable set of rows in the source tables
    Please advice
    Edited by: user13382934 on Jul 9, 2011 1:32 PM

    Please try this
    create table UPDTE_DEFERRED_MAILING_RECORDS nologging as
    SELECT distinct a.CUST_ID,
    a.EMP_ID,
    a.PURCHASE_DATE,
    a.drank,
    c.CONTACT_CD,
    c.NEW_CUST_CD,
    a.DM_ROW_ID
    FROM (SELECT a.ROWID AS DM_ROW_ID,
    a.CUST_ID,
    a.EMP_ID,
    a.PURCHASE_DATE,
    dense_rank() over(PARTITION BY a.CUST_ID, a.EMP_ID ORDER
    BY a.PURCHASE_DATE DESC, a.ROWID) DRANK
    FROM deferred_mailing a) a,
    customer c
    WHERE a.CUST_ID = c.CUST_ID
    AND a.EMP_ID = c.EMP_ID
    AND (a.PURCHASE_DATE <= c.PURCHASE_DATE OR
    c.PURCHASE_DATE IS NULL)
    and a.drank=1;
    The query you've posted is behaving according to the expectations. The inner select is returning one row and the outer is returning two as the
    WHERE a.CUST_ID = c.CUST_ID
    AND a.EMP_ID = c.EMP_ID
    AND (a.PURCHASE_DATE <= c.PURCHASE_DATE OR
    c.PURCHASE_DATE IS NULL)
    conditions are seeing two rows in the table customer.
    I've added the a.drank=1 clause to skip the duplicates from the inner table and distinct in the final result to remove duplicates from the overall query result.
    For eg, if you have one more row in the deferred_mailing like this
    SQL> select * from DEFERRED_MAILING;
    CUST_ID EMP_ID PURCHASE_
    444 10 11-JAN-11
    444 10 11-JAN-11
    then the query without "a.drank=1" will return 4 rows like this by the outer query.
    CUST_ID EMP_ID PURCHASE_ DM_ROW_ID DRANK C N
    444 10 11-JAN-11 AAATi2AAGAAAACcAAB 2 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAA 1 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAB 2 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAA 1 Y Y
    It'll return the below even if we use distinct on the same query(i.e. without a.drank=1)
    CUST_ID EMP_ID PURCHASE_ DM_ROW_ID DRANK C N
    444 10 11-JAN-11 AAATi2AAGAAAACcAAB 2 Y Y
    444 10 11-JAN-11 AAATi2AAGAAAACcAAA 1 Y Y
    which contains duplicates again.
    So, we need a combination of distinct and dense here.
    btw, Please mark the thread as 'answered', if you feel you got your question answered. This will save the time of others who search for open questions to answer.
    Regards,
    CSM

  • How to sum the  result rows at query designer

    Hi,
    We want to sum  the result rows which are at the end of the row by the help of query designer?So ,we directly see at analyzer
    exp:
       ..A.jan...A.feb...B.may...B.jun...SumA...SumB....SumA+B
    X..1............9..........6..............7........10.........13..........?????
    Edited by: zarata on Oct 23, 2011 12:49 PM
    Edited by: zarata on Oct 23, 2011 1:07 PM

    Hi,
    Could you please provide some more information.
    if you have characteristics iobject whose values are (A, B etc) and calendar month in rows and then at column level you have key figures then if you have turn on the "Display Result Rows" property of both iobject in Bex  as "Always" you can get the result. At the same time you can set "Display Overall result" property of the Query to get overall result.
    Regards,
    Pravin

  • Fetching a partial range of selected result rows from the client side

    It has been a while since I started trying to solve this Oracle puzzle.
    Basically, what I need it is a way to fetch from the client side a run-time
    defined range of result rows of a arbitrary SELECT query.
    In low-end databases like MySQL I can do it simply by appending the LIMIT
    argument to the end of the SELECT query statment passing the number of
    the first row that I want to be returned from the server from the total
    result rows available in the result set and the maximum number of rows
    that it may return if available.
    In higher end databases I am supposed to use server side cursors to skip
    any initial rows before the first that I want to retrieve and fetch only
    the rows I want up to the given limit.
    I am able to achieve this with PostgreSQL and Microsoft SQL server, but I
    am having a hard time with Oracle. The main problem is how do I fetch
    result rows from a server side cursor and have their data returned to a
    client side in a result set like in a straight SELECT query?
    I was able to create a cursor and fecth a row into a server side record
    variable with the following PL/SQL code.
    DECLARE
    CURSOR c IS SELECT * FROM my_table;
    my_row c%ROWTYPE;
    BEGIN
    OPEN c;
    FETCH c INTO my_row;
    CLOSE c;
    END;
    I want to do this from PHP, so I don't have client side ESQL variables to
    store the result set data structure. Anyway, if I can do it just with
    SQLPlus I should be able to do it in PHP.
    If I do straight SELECT I can get the result set, but in a PL/SQL script
    like the one above I don't seem to be able to select the data in the
    fetched row record to have returned to the client. Does a straight SELECT
    query sends the result rows to a default client side variable?
    If anybody can help, I would appreciate if you could mail me at
    [email protected] because I am not able to access this forum all the time in
    the Web. BTW, is it possible to access this forum by e-mail?
    Thanks in advance,
    Manuel Lemos
    null

    Hello Jason,
    On 03-Feb-00 05:34:14, you wrote:
    I'm not sure I totally understand your problem, but I think you might be able
    to solve it by using the ROWNUM variable. ROWNUM returns the sequenc number
    in which a row was returned when first selected from a table. The first row
    has ROWNUM = 1, the second has ROWNUM = 2, etc. Just remember that the
    ROWNUM is assigned as soon as it's selected, even before an order by. So if
    you have an order by clause, it'll mess it up. Here's an example. I hope
    that helps.I though of that before but it doesn't help because if you use ORDER BY the
    first result row might not have ROWNUM=1 and so on. Another issue is that
    I want to be able to skip a given number of result rows before returning
    anything to the client.
    The only way I see to do it is to get the rows with server side cursor.
    But how do I return them to the client? Where does a normal select returns
    the rows? Isn't there a way to specify that the fetch or something else
    return the rows there?
    Regards,
    Manuel Lemos
    Web Programming Components using PHP Classes.
    Look at: http://phpclasses.UpperDesign.com/?user=[email protected]
    E-mail: [email protected]
    URL: http://www.mlemos.e-na.net/
    PGP key: http://www.mlemos.e-na.net/ManuelLemos.pgp
    null

  • ORA-30926: unable to get a stable set of rows in the source tables

    hi,
    I am loading data from source table to target table in a interface.
    Using LKM incremental update .
    In the merge rows step , getting the below error.
    30926 : 99999 : java.sql.SQLException: ORA-30926: unable to get a stable set of rows in the source tables
    please help as what should be done to resolve this.

    Below is the query in the merge step...
    when i run from SQL also, same error
    SQL Error: ORA-30926: unable to get a stable set of rows in the source tables
    30926. 00000 - "unable to get a stable set of rows in the source tables"
    *Cause:    A stable set of rows could not be got because of large dml
    activity or a non-deterministic where clause.
    *Action:   Remove any non-deterministic where clauses and reissue the dml.
    merge into     TFR.INVENTORIES T
    using     TFR.I$_INVENTORIES S
    on     (
              T.ORGANIZATION_ID=S.ORGANIZATION_ID
         and          T.ITEM_ID=S.ITEM_ID
    when matched
    then update set
         T.ITEM_TYPE     = S.ITEM_TYPE,
         T.SEGMENT1     = S.SEGMENT1,
         T.DESCRIPTION     = S.DESCRIPTION,
         T.LIST_PRICE_PER_UNIT     = S.LIST_PRICE_PER_UNIT,
         T.CREATED_BY     = S.CREATED_BY,
         T.DEFAULT_SO_SOURCE_TYPE     = S.DEFAULT_SO_SOURCE_TYPE,
         T.MATERIAL_BILLABLE_FLAG     = S.MATERIAL_BILLABLE_FLAG,
         T.LAST_UPDATED_BY     = S.LAST_UPDATED_BY
         ,T.ID     = TFR.INVENTORIES_SEQ.NEXTVAL,
         T.CREATION_DATE     = CURRENT_DATE,
         T.LAST_UPDATE_DATE     = CURRENT_DATE
    when not matched
    then insert
         T.ORGANIZATION_ID,
         T.ITEM_ID,
         T.ITEM_TYPE,
         T.SEGMENT1,
         T.DESCRIPTION,
         T.LIST_PRICE_PER_UNIT,
         T.CREATED_BY,
         T.DEFAULT_SO_SOURCE_TYPE,
         T.MATERIAL_BILLABLE_FLAG,
         T.LAST_UPDATED_BY
         ,T.ID,
         T.CREATION_DATE,
         T.LAST_UPDATE_DATE
    values
         S.ORGANIZATION_ID,
         S.ITEM_ID,
         S.ITEM_TYPE,
         S.SEGMENT1,
         S.DESCRIPTION,
         S.LIST_PRICE_PER_UNIT,
         S.CREATED_BY,
         S.DEFAULT_SO_SOURCE_TYPE,
         S.MATERIAL_BILLABLE_FLAG,
         S.LAST_UPDATED_BY
         ,TFR.INVENTORIES_SEQ.NEXTVAL,
         CURRENT_DATE,
         CURRENT_DATE
         )

  • MERGE error : unable to get a stable set of rows in the source tables

    Hi,
    For an update, the following MERGE statement throws the error-unable to get a stable set of rows in the source tables:
    MERGE INTO table2t INT
    USING (SELECT DISTINCT NULL bdl_inst_id,.......
    FROM table1 ftp
    WHERE ftp.gld_business_date = g_business_date
    AND ftp.underlying_instrument_id IS NOT NULL) ui
    ON ( ( INT.inst_id = ui.inst_id
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.ric = ui.ric
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.isin = ui.isin
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.sedol = ui.sedol
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    OR ( INT.cusip = ui.cusip
    AND g_business_date BETWEEN INT.valid_from_date
    AND INT.valid_to_date
    WHEN MATCHED THEN
    UPDATE
    SET INT.inst_id = ui.inst_id, INT.ric = ui.ric
    WHEN NOT MATCHED THEN
    INSERT (inst_key, ......)
    VALUES (inst_key, ......);
    To determine the existence of a record, first check if any match is found on the first key, if not then search for the second key and so on.
    Now two records with differenct first key, i.e. inst_id, can have the same ric(second key). On a rerun, with the target table already populated, the code fails. The reason is it finds duplicate entries for the second key.
    Any suggestions on how to make this work?
    Thanks in advance.
    Annie

    Annie
    You've spotted the problem (that two records have the same RIC). MERGE doesn't allow that; each record in the data being updated is only allowed to be updated once.
    Is there a PK column (or columns) that we can rely on?
    What you can try is to outer join FTP to INT. Something like:
    MERGE INTO INT int1
    USING (
        select columns_you_need
        from (
            select ftp.columns -- whatever they are
                   , int2.columns
                   , row_number() over (partition by int2.pk_columns order by int2.somecolumns) as rn
            from   ftp
            left join int int2
            on (the condition you used in your query)
        where rn=1
    ) s
    WHEN MATCHED THEN UPDATE ...
    WHEN NOT MATCHED THEN INSERT ...So if you can restrict the driving query so that only the first one of the possible updates actually gets presented to the MERGE operation, you might be in with a chance :-)
    And of course this error is nothing to do with any triggers.
    HTH
    Regards Nigel

  • Decimal places on the result row is incorrect

    Dear Expert,
    I met a problem that decimal places on the result row is incorrect.Anyone can help me?
    On key figure balance,we do the currencies translation,also we set the key figure should have two decimal places.
    We set a fomular to calculate the total result of Account A,B,C.
    (Total result = account Aaccount Baccount C).
    If we manually sum up the balance of account A,B,C displayed on analyzer,which are rounded to 2 decimal places,the result should be 601.25(100.61200.38300.26),but the actual total result executed by query is 601.24.
    In fact we need the result 601.25 instead of 201.24.
    I take the example as following:
    Account      Balance
    Account A  100.61
    Account B  200.38
    Account C  300.26
    Total result 601.24
    Thank you in advance.
    Best Regards,
    Maggie
    Edited by: Maggie Ma on Sep 25, 2008 9:17 AM

    your "problem" is, that BEx is not totalling the "displayed" values but the real values
    try a summation on the following in Excel:
    100,605
    200,375
    300,26
    then format the cells to show 2 decimal places only
    do you see the result changing?

  • Restricting on the Result Row

    I have a query where I am trying to restrict the query by the results row.  For example:
    Account Nbr       Installation         Type         Nbr of Installations
    12345                 70430                Elec                        1
    12345                 70691                Elec                        1
    12345                 71321                Gas                        2
    Result Row                                                                 3
    15421                 70002                Gas                        1
    Result Row                                                                 1   
    In this case I would only like to see the first set because the result is greater than 1.  How can I accomplish this? Thanks.
    Edited by: labraun on Nov 4, 2009 7:16 PM

    hi ravi,
    that sounds intrestin.
    MAy be u can do this in the update rule i.e instead of KF use as Char and just concatinate figures.
    and in the report u can do some manupiation to show results .
    cheers
    Babu

Maybe you are looking for