Total result  & formula result  is wrong in query out put

Hi BW gurus
I have issue with total result and formula result
my requirement
Formula for hours is ( total time / Counter / 60)
hours  column displaying
   14.2
     2.4
     3.4
Total -
5.6   not  20    then I setp calculate results to SUM  now total displying 20  perfect.
Then I am using hours colum for calculation   here is my issue
Qty rec per hour formula is = received / Hour
Hours   Qty rec per hour          received
14.2              100                            14200
2..4               100                              2400
3.4                100                              3400
20                 300                              20000        result column for qty rec per hour is wrong . formula is not working on result for qty rec per hour
Actually qty rec per hour result should be 20000/20  = 1000
How to resolve this issue
Thanks
Rohan

Hi BW Gurus,
Thanks for your help .
Let me explain my issue with examples :
My report is by document date level ( Not at Po or PO line Level)
I have a 3 Key figures
1.  Hour -  is poulation at  PO Line level
Ex :  4500001    1             5.30
                         2            5.30
                         3            5.30
Then I am using counter to get single for time
Hour/ Count  now my value is 5.30 in the report . hour column is perfect
2. Po Qty  is fine
3.  Qty Recd per hour ( Calculation)    PO QTy / Hour
Now the issue is  each row caluculating perfect . but result row is not correct  Qty Received per hour . We don"t wont  sum of  Qty received per hour in result . We want  Caluclation result in the result
Here is the issue
If I have multiple POs for same document date  , each row is fine but system using division at Hour result also by COunter . because of thati am getting wrong hours in result for hour . this wrong result is using for Poqty receved per hour result  also .
I put total for hour coulum result is perfect but for clauclation it is talking total hours/ total conter result .How to replace result caluculating by counter .This is our major issue .
Appriciate your response
Thanks
Rohan

Similar Messages

  • Query Out Put

    Hi All,
      I generated query the out put of query is as shown below.
    ma01        10kg   dc01
    ma02        20kg   dc02
    I dont want kg in the second column but I want only numbers like 10,20...
      Thanx in advance.

    Hi,
    Use NODIM function for your mass.
    Best regards,
    Eugene

  • Results Values displyed as Stars in the out put Cell

    Hi Gurus. I have one question for you.
    After execution of my query, in the results columns the values are displayed as Stars () instead of values.But when we place the cursor on the particular cell (Star ()),The values are displaying in the formula bar of the excel sheet.
    How can I get the direct values in the results area?
    What I need to do?
    Regards,
    Uma.

    Thanks Anil,
    Yes, I have applied the NODIM & NDIV functions as well. But still it's giving the same, I guess the about functions will be used when we will get the values of "X".
    Can I use any other functions to solve this issue?
    I think the definition is correct at query level; we can deliver the same to the user.
    Please suggest me, if wrong.
    Regards,
    Uma.

  • Duplicates in sql query out put when qury has join on multiple tables.

    I have the below query whcih is returning 2 duplicate records.
    Is there any way how to figure out from which table is causing the duplicate?
    There are so many inline view and join conditions in this query .
    in waht join conditions i need to look into mainly?
    or how to find the whcih table is causing the duplicate when we have multimple joins?
    this is really bothering me a lot .please help me with this.
    SELECT       'BCCALGLB'            model_cd,
                         fi_instrument_id,
                         fmr_cusip             instrument_id,
                         price,
                         '27-FEB-2013'          pricing_dt,
                         currency_cd
                         FROM         (SELECT  II.fmr_cusip,
                                  IAI.fi_instrument_id,
                                  IP.price,
                                  IP.currency_cd
                          FROM    (SELECT  IdxHldg.vendor_instrument_id,
                                           IdxHldg.index_cd,
                                           IdxHldg.data_source_cd,
                                           GM.member_rank,
                                           RANK () OVER (PARTITION BY  IdxHldg.vendor_instrument_id
                                                         ORDER BY      GM.member_rank  ASC)  priority
                                   FROM    (SELECT  IBH.vendor_instrument_id,
                                                    IBH.index_cd,
                                                    IBH.data_source_cd
                                            FROM    fi_idx_benchmark_holdings  IBH
                                            WHERE   IBH.pricing_dt = '27-FEB-2013'
                                            UNION
                                            SELECT  IFH.vendor_instrument_id,
                                                    IFH.index_cd,
                                                    IFH.data_source_cd
                                            FROM    fi_idx_forward_holdings  IFH
                                            WHERE   IFH.pricing_dt = '27-FEB-2013'
                                           )  IdxHldg,
                                           fi_group_member  GM
                                   WHERE   GM.group_cd      = 'BCGLOBALIDX'
                                   AND     GM.purpose_cd    = 'GLOBALIDX'
                                   AND     IdxHldg.index_cd = GM.character_val
                                  )  BCIdxHldg,
                                  fi_idx_instrument  II,
                                  fi_idx_price  IP,
                                  instrument_alternate_id  IAI,
                                  instrument  I
                          WHERE   BCIdxHldg.priority                  =      1
                          AND     BCIdxHldg.data_source_cd            =      II.data_source_cd
                          AND     BCIdxHldg.vendor_instrument_id      =      II.vendor_instrument_id
                          AND     II.data_source_cd                   =      IP.data_source_cd
                          AND     II.vendor_instrument_id             =      IP.vendor_instrument_id
                          AND     IP.currency_cd                      =      I.currency_cd
                          AND     IP.pricing_dt                       =      '27-FEB-2013'
                          AND     II.fmr_cusip                        =      IAI.alternate_id
                          AND     IAI.alternate_id_type_code          =      'FMR_CUSIP'
                          AND     IAI.fi_instrument_id                =      I.fi_instrument_id
                          AND     NVL (I.instrument_domain_cd, 'XXX') NOT IN ('MBS', 'MGEN')
                          AND     NVL (I.instrument_type_cd, 'XXX')   !=     'CMBS'
                          AND     ((I.currency_cd                     NOT IN ('CAD', 'USD'))
                                   OR
                                   (EXISTS (SELECT  1
                                            FROM    adm_calendar_date  ACD,
                                                    ctry_curr_link  CCL
                                            WHERE   TO_DATE (ACD.calendar_yyyymmdd, 'YYYYMMDD') = '27-FEB-2013'
                                            AND     ACD.calendar_origin_cd                      = 'EXCHANGE'
                                            AND     ACD.calendar_type_cd                        = 'BUSINESS'
                                            AND     ACD.geography_cd                            = CCL.ctry_cd
                                            AND     CCL.link_typ                                = 'ISS'
                                            AND     CCL.curr_cd                                 = I.currency_cd
                                            AND     ACD.business_day_ind                        = 'Y'))))

    Hi,
    953115 wrote:
    I have the below query whcih is returning 2 duplicate records.
    Is there any way how to figure out from which table is causing the duplicate?
    There are so many inline view and join conditions in this query .
    in waht join conditions i need to look into mainly?
    or how to find the whcih table is causing the duplicate when we have multimple joins?What has changed since the last time the query ran correctly? (It must have run correctly at some point. You didn't just write a query that big all at once without testing each individual part, did you?)
    Find a small set of sample data that causes the problem. Create and work with tables that have only that small set of data.
    Take baby steps. Start with the most deeply nested sub-query. and simplify it so that it uses only 1 table: comment out all references to other tables. Does it produce exactly what you're expecting, especially the number of rows?
    If not, post just that one sub-query, your sample data, and the output you need (but are not getting) from that sub-query.
    If it does work, then un-comment the other tables, 1 at a time. Test after each one. If the revised sub-query starts acting strangely, then you have a good clue about what's causing the problem, but if you can't figure it out, post that much of the query, your sample data (CREATE TABLE and INSERT statements) and the expected results from the code you posted.
    If then entire sub-query works, then add the next super-query, and repeat the testing process.
    What is the data type of ibh.pricing_dt?
    If its a DATE, then don't compare it to a VARCHAR2, as you're doing in this line:
    IBH.pricing_dt = '27-FEB-2013'Use TO_DATE to convert a string, such as '27-FEB-2013', to a DATE.
    If it's not a DATE (or TIMESTAMP), then you have an even more serious problem.

  • Document currency in cube but not in the getting in query out put

    Hi Gurus,
    I am in production.... my query is regarding account receivable( which is user defined ie., is custom )  i am able to see amount in document currency in cube but is not appering when i excute the query ...
    And i am to get the output amount in local currency ( i am getting ) amount in document ( not getting )
    and revalution amount ( not getting )---- which is cal key fig 
    and finally   Amount FAS ( not getting ) ---  which is Restricted key fig
    Gurus Please suggest ..........

    Hi,
    The fields in the report
    customer
    HFC code
    doc Number
    business divison
    sales order
    country
    profit center
    customer number compounded with company code
    customer payment terms
    reference
    documennt type
    document date
    net due date
    G/L Account comp cpde
    item  Status
    Document currency
    Account in Local currency
    Amount  in Document currency
    filters are
    compay code
    controling area
    Business Division
    Free char
    Controling area
    account type
    clearing Doc Number
    Ref Key 2
    Fical year
    Fiscal year / period
    interunit / outside
    Posting Date
    Leading BD ( Wbs Attr)
    in rows
    customer
    doc number
    business divison
    sales order
    country
    profit center
    customer bumber compounded with company code
        under this we have customer payment terms
    Reference
    document type
    document date
    Net due date
    G/L Account Comp code
    item status
    Document Currency
    In columns
    i am selecting
    Amount  in local currency
    amount Document currency
    Revaluation amount
    Amount in FAS

  • In the query out put,right click on k.f,there we fine one option HIDE

    why we use it?

    hi,
        it is generally used if you do not want to see the keyfigure in the query output.
    if u wnat to do analysis on sales and you do notyt want to see predouction kf then u can use it
    regards
    pls assign points if helful.

  • Changing the Infoset Query out put field

    Hi,
      Please let me know can we do the changes for the Input/Output field for the infoset query in PRD. That mean  if some of the fields are hidden and we want to show them at the output can we directly do the changes in PRD .
    Thanks & Best Regards,
      Mahesh

    hi
    Create the infoset with PNP database and add all the infotypes required (including custom ones). Add all fields.. vale, text etc. as seperate fields of the custom Z tables as additional fields in the infotypes and write your code accordingly to select the data into these fields based on the already existing infotype fields. For example if you want to get designation based on position you will write:
    select <designation> from ZDESG
    into <custom field>
    where PLANS = P0001-PLANS
    Creating joins over already existing joins will not be a stable solution.
    thanks & regards
    Satish

  • Getting running total formula result at the beginning of the report

    Hello All,
    I am having an inquiry that if I can get a grand total in the report footer to the report header.
    The grand total is not a direct sum.  I am using three formulas
    the first formula:
    @reset Group Header
    whileprintingrecords;
    numbervar sumpct4;
    if not inrepeatedgroupheader then
    sumpct4 := 0;
    the second formula: Details section
    whileprintingrecords;
    numbervar sumpct4 := sumpct4 + {@Total_Market};   // {@Total_Market}; =  Amount+ Interest
    numbervar grtotal4 := grtotal4 + {@Total_Market};
    Group Footer
    whileprintingrecords;
    numbervar sumpct4;
    Report Footer
    whileprintingrecords;
    numbervar grtotal4;
    All that I need is to show the total which is in the report footer at the top of the page where I am having a summary.
    So, can you please help me.
    Thanks
    Edited by: maas maas on Sep 8, 2010 12:48 PM

    Hello my friend,
    I want this to be controlled in crystal.
    Is there is a way to get the grand total by using multiple formulas or any other way?
    Here is the structure of my report:
    Group Header 1: CCY
    Group Header 2:Type
    @reset Group Header
    whileprintingrecords;
    numbervar sumpct4;
    if not inrepeatedgroupheader then
    sumpct4 := 0;
    Group Header 3A: Deal No
    Group Header 3B: Deal No (subreport to get the {@amount} for each deal)
    I will pass the end_date from the main report to subreport and I will get the sum(amount) for each deal between date (1-1-2008) to end_date. The sum will be as a shared variable to the {@amount} formual in the main report.
    Details:
    Deal No, {@amount}, {@Price}, {@market}, {@Total_Market}
    {@Price}: if {table.price} = 0 then
    100
    else {table.price}
    {@market}: if Type <> "DEP" then
    ({@amount}*{@Price})/100
    else
    {@amount}
    {@Total_Market}:{@market}+ {@Price}
    Running formula to get Total_market: Details section
    whileprintingrecords;
    numbervar sumpct4 := sumpct4 + {@Total_Market};
    numbervar grtotal4 := grtotal4 + {@Total_Market};
    Group Footer 3B: Deal No
    Group Footer 3A: Deal No
    Group Footer 2:Type
    In this group I am placing a running total formula:
    whileprintingrecords;
    numbervar sumpct4;
    Group Footer 1: CCY
    Report Footer:
    @grand_Total
    whileprintingrecords;
    numbervar grtotal4;
    Now, i want this @grand_total formula result to be shown in Group Header 1: CCY.
    I tried to insert a subreport at the beginning which it is a copy of the main report, but I did not get the coorec t result because I am getting the {@amount} from a subreport and in crystal I can't insert a subreport in an existing subreport.

  • Saving formula results in structures

    Hi,
    i built a structure to input values of a "profit and loss"-statement. The turnover, for example, is shown as a sum of three accounts:
    account        description
    10000          Turnover 1
    11000          Turnover 2
    12000          Turnover 3
    13000          Total Turnover (formula: account 10000 + account  11000 + account 12000)
    If i open the planning-query it is possible to input values for the first three accounts and the sum in the "Total"-account is calculated.
    After saving these values i tried to get just the value of the "Total"-account (13000), but got no result.
    ? is it possible to save the result of a formula in a cube ?
    Best regards,
    Bernhard Cerny

    Bernhard,
    You have to have something to save the value against in the cube - i.e. with your example of a formula in a structure the system would not understand which account to save the data against.
    I suppose the question is, why do you need a total? If just for reporting then you can achieve via a structure, formula or a hierarchy at runtime. Alternatively you can utilise excel's native functionality to present the calculations in a workbook and utilise 7.0's new cell referencing capabilities (=bexgetdata)
    If you need the calculated value for some other purpose - e.g. you need to reference the value in a FOX formula to calculate a different value or you need to report the sum into another cube for aggregated calculations (e.g. BS / CF etc.) then you can do this by, for example, using the filters or summing within the FOX.
    However, if you must have the total in the cube then create an account in the database to reflect the total, put it an input query and then either use a hierarchy with the new postable nodes functionality or a fox formula to calculate or use =bexsetdata to reference the cell you wish to save into the database
    =BExSetData(cell where value is, "DATA_PROVIDER_X", column names, row names).
    Hope this helps,
    Keith

  • Formulas results outside of row and column axis

    The report has an area of row axis and column axis. This area is where the results from BW are displayed.
    We have a requirement where we would have to create formulas using the BW Analyzer results of the row axis and column axis and display the results after the last row of this area.
    For example, after the BW Analyzer displays the result area to the Excel, we are required to take Excel Cell D10 * C7 and put the results to B33.
    <b>B33 = D10*C11</b>
    Excel row 30 is the last row from the row axis result area.
    I have searched through the forum for Cell Editor, but it seems that the requirement is to use 2 structures and use Cell Editor only when there is a formula collision. Our requirement has 1 structure, but I guess we can create the other structure for the column axis results. But still I think Cell Editor is a computation of formula collision within the row and column axis result area.
    My question is will Cell Editor meet our requirement if we want to get formula results from the row and column axis and then display the results outside of the row and column axis result area?
    Our approach was to use the Excel cell formulas in the workbook or possibly macros, but it seems that the Excel formulas will do.
    Would someone clarify about the Cell editor for this requirement and how would you approach this?
    Would this be effective to do the formulas from the query level? We are working on 3.5 SP11.

    Can Cell editor do the following:
    1. Create structures
    2. Run the query
    3. The results of the structures are displayed in the row and column axis of the BEx Analyzer
    4. Save as a workbook
    5. Use the Cell Editor to pick and choose the cells (Not the Excel cells) to create formulas
    6. The formula results are then displayed outside of the row and column axis.
    Would this be another approach?
    What scenario can Cell editor be used? What scenario can Cell editor not be used?
    Thanks

  • How to get total number of result count for particular key on cluster

    Hi-
    My application requirement is client side require only limited number of data for 'Search Key' form total records found in cluster. Also i need 'total number of result count' for that key present on the custer.
    To get subset of record i'm using IndexAwarefilter and returning only limited set each individual node. though i get total number of records present on the individual node, it is not possible to return this count to client form IndexAwarefilter (filter return only Binary set).
    Is there anyway i can get this number (total result size) on client side without returning whole chunk of data?
    Thanks in advance.
    Prashant

    user11100190 wrote:
    Hi,
    Thanks for suggesting a soultion, it works well.
    But apart from the count (cardinality), the client also expects the actual results. In this case, it seems that the filter will be executed twice (once for counting, then once again for generating actual resultset)
    Actually, we need to perform the paging. In order to achieve paging in efficient manner we need that filter returns only the PAGESIZE records and it also returns the total 'count' that meets the criteria.
    If you want to do paging, you can use the LimitFilter class.
    If you want to have paging AND total number of results, then at the moment you have to use two passes if you want to use out-of-the-box features because LimitFilter does not return the total number of results (which by the way may change between two page retrieval).
    What we currently do is, the filter puts the total count in a static variable and but returns only the first N records. The aggregator then clubs these info into a single list and returns to the client. (The List returned by aggregator contains a special entry representing the count).
    This is not really a good idea because if you have more than one user doing this operation then you will have problems storing more than one values in a single static variable and you used a cache service with a thread-pool (thread-count set to larger than one).
    We assume that the aggregator will execute immediately after the filter on the same node, this way aggregator will always read the count set by the filter.
    You can't assume this if you have multiple client threads doing the same kind of filtering operation and you have a thread-pool configured for the cache service.
    Please tell us if our approach will always work, and whether it will be efficient as compared to using Count class which requires executing filter twice.
    No it won't if you used a thread-pool. Also, it might happen that Coherence will execute the filtering and the aggregation from the same client thread multiple times on the same node if some partitions were newly moved to the node which already executed the filtering+aggregation once. I don't know anything which would even prevent this being executed on a separate thread concurrently.
    The following solution may be working, but I can't fully recommend it as it may leak memory depending on how exactly the filtering and aggregation is implemented (if it is possible that a filtering pass is done but the corresponding aggregation is not executed on the node because of some partitions moved away).
    At sending the cache.aggregate(Filter, EntryAggregator) call you should specify a unique key for each such filtering operation to both the filter and the aggregator.
    On the storage node you should have a static HashMap.
    The filter should do the following two steps while being synchronized on the HashMap.
    1. Ensure that a ConcurrentLinkedQueue object exists in a HashMap keyed by that unique key, and
    2. Enqueue the total number count you want to pass to the aggregator into that queue.
    The parallel aggregator should do the following two steps while being synchronized on the HashMap.
    1. Dequeue a single element from the queue, and return it as a partial total count.
    2. If the queue is now empty, then remove it from the HashMap.
    The parallel aggregator should return the popped number as a partial total count as part of the partial result.
    The client side of the parallel aware aggregator should sum the total counts in the partial result.
    Since the enqueueing and dequeueing may be interleaved from multiple threads, it may be possible that the partial total count returned in a result does not correspond to the data in the partial result, so you should not base anything on that assumption.
    Once again, that approach may leak memory based on how Coherence is internally implemented, so I can't recommend this approach but it may work.
    Another thought is that since returning entire cached values from an aggregation is more expensive than filtering (you have to deserialize and reserialize objects), you may still be better off by running a separate count and filter pass from the client, since for that you may not need to deserialize entries at all, so the cost on the server may be lower.
    Best regards,
    Robert

  • How do I put a label in a null field in the result set of a group-by query

    I run the query:
    select section, count(*) from nparcel group by section
    and get the result
    section1 100
    section2 200
    section3 300
    400
    I would like to modify the query to put a label, perhaps 'BLANK', in the last returned row. Is that possible and if so how.
    Thanks in advance for helping.

    Hi,
    In SQL*Plus you have some additional options, that apply to all queries until you override them or end the session.
    COLUMN section NULL BLANKapplies only to the column called "section".
    SET NULL BLANKApplies to all columns.

  • How to remove the 0 that is added to the formula result

    Hi,
           I have a formula field. i placed the formula field in the group footer. zero (0) is added to the formula result. if the formula result is 8 then i am getting 0.00 and 8 as data when i select the browse field data of that field . how to remove the zero. i also used supress formula for the field. but it is not working. any idea on this regard.
    Regards,
    Shanthakumar.

    hi,
      Formula : GRP1Focus
                  if ({@Grp1BrandName}={@All Brand Names})  then {@FocusValue NBSH}. when i right click the formula field and select browse data. 0.00 and 8 are displaying.
    Suppress formula
             GRP1Focus=0
    Regards,
    Shanthakumar

  • Fast fromula related to oracle payroll are not called from Formula result window

    Hi,
    Few of the fast fromula related to oracle payroll are not called from Formula result window , please let me know how these fast formulas are called.
    Example : PAY_GB_EDI_MOVDED6_FOOTER
    Thanks,
    Subbu.

    Hi Subbu,
    Some reports are handled by the PYUGEN engine as Magnetic reports.
    These are old fashion reports to generate Magnetic files, like BACS EDI files etc..
    select * from ff_formulas_f
    where formula_name like 'PAY_GB_EDI_MOVDED6%';
    If you see the above, there are 3 formulas defined for generating this report - Header, Body & Footer.
    All are called in a sequence by the PYUGEN process based on what you seed in pay_magnetic_blocks.
    All the logic is within these Fast formulas.
    But as they're seeded there's nothing much you can do.
    Cheers,
    Vignesh

  • How to inlcude all records in a report, with a formula result of 0 or 0?

    I'm reporting on classes scheduled for a certain location, and calculating the number of available seats per class. A formula will give me the net seats available (Max seats-count of students). BUT if there are no students enrolled, class does not appear on the report. Formula is {SCHEDULES.qy_sch_max} - Count ({WAITING_LISTS.no_emp}, {SCHEDULES.cd_crs)
    What am I missing? Currently using Crystal 8.5 and reporting against a SQL database.
    Appreciate your help.
    christi

A: How to inlcude all records in a report, with a formula result of 0 or >0?

thanks, Sanjay - been there done that.
basically, I need to show the net result for the open seats available,which will be the same as the max seats offered.
I tried the following:
If Isnull{WAITING_LISTS.no_emp}
then {@Open}={SCHEDULES.qy_sch_max}
else
{SCHEDULES.qy_sch_max} - Count ({WAITING_LISTS.no_emp}, {SCHEDULES.cd_crs})
and got a message "Missing the then".  (@Open is the formula title)

thanks, Sanjay - been there done that.
basically, I need to show the net result for the open seats available,which will be the same as the max seats offered.
I tried the following:
If Isnull{WAITING_LISTS.no_emp}
then {@Open}={SCHEDULES.qy_sch_max}
else
{SCHEDULES.qy_sch_max} - Count ({WAITING_LISTS.no_emp}, {SCHEDULES.cd_crs})
and got a message "Missing the then".  (@Open is the formula title)

Maybe you are looking for