Calculation of bw statistics on query.

hai experts,
                     creating the aggregate , due to query  performance is low.please suggest me steps how to calculate the bw  statistics  on  a query.
  thanks & regards
   karthik.M

BW statistics will give you result in BW reports, you can do your analytics better thr taking advantage of BW reporting features....
You can use ST03n for analysis if you don't have BW statistics loaded or up to date...
Again there is no fixed rule, its your choice..
Few options you may only find in RSRT and may have to use it..

Similar Messages

  • How to use a calculated column in the same query

    Hi All,
    I need some help with using a calculated column in the same query.
    For eq
    I am joining a couple of tables and some of the select columns are calculated based on the columns of the tables and i want a new column in the same query to use this calculated feild in some other calcualtion.
    something like this...
    select (12+3) as Sum1, (12-3) as Sum2, (Sum1 + Sum2 ) as Sum3
    from dual
    or
    select (12+3) as "Sum1", (12-3) as "Sum2", CASE WHEN ( "Sum1" / "Sum2" * 100 > 0 ) THEN 'Yes' ELSE 'No' END
    from dual
    Thanks

    user548171 wrote:
    select (12+3) as Sum1, (12-3) as Sum2, (Sum1 + Sum2 ) as Sum3
    from dual
    or
    select (12+3) as "Sum1", (12-3) as "Sum2", CASE WHEN ( "Sum1" / "Sum2" * 100 > 0 ) THEN 'Yes' ELSE 'No' END
    from dual
    ThanksWhat about just repeating the column values:
    select (12+3) as "Sum1", (12-3) as "Sum2", CASE WHEN ( (12+3) / (12-3)  * 100  > 0 )  THEN 'Yes' ELSE 'No'  END FROM DUAL

  • Discoverer EUL Workbooks - Query Statistics, Workbooks Queried By User

    Hi there.
    I've just ran Discoverer EUL workbooks and found out a nice functionality on one of those queries. It's on EUL Query Statistics workbook, "Workbooks Queried By User" worksheet (and others).
    If you take a look at the "Worksheet Usage" column, you'll notice that there's an effect that looks a lot like a "progress bar". According to the times that worksheet was used, this bar advances or retract.
    I noticed it's a calculated column, but when I try to edit it, it shows no more than COUNT_DISTINCT("Date & Sheet"). I got a little confused on how this COUNT_DISTINCT shows that "progress bar"....
    So... how can I implement this on my DM queries?
    TIA.

    You need Desktop. When you format the data, there is a check box to show graphical bars. This option is not available in Plus, but the bars will show up when the report is displayed in Plus.

  • Using a "Sum" Calculated Field on a "Count" query column?

    Here's my query using the Query Report Builder:
    SELECT Col1, COUNT(Col1) AS Count_Column
    FROM Table
    GROUP BY Col1
    It generates a report that lists all the values of column
    "Col1" and how many times each value was used in Col1
    For instance, if Col1 contained the value 'A' 12 times, 'B' 6
    times, and 'C' 19 times, the report would generate this:
    A - 12
    B - 6
    C - 19
    What i need as a column footer is the total count of all the
    values, which in this case 12+6+19=37
    I am using a calculated field, setting the data type to
    Double, the calcuation to Sum, and the perform calculation on to
    'query.Count_Column'. Reset Field When is set to None.
    When I run the report, it doubles the last number in the
    report's Count column (19) and displays 38 on the page. I tested
    this with another column and it doubled the last number in the
    report as well.
    How can I get it to properly Sum my Count_Column?

    Hi,
    You need to check note 208366.1 which explains why totals can be blank. Without knowing the detail of you decode function it is hard to say what needs to be changed. Try putting a sum in front of the decode e.g.
    sum(decode(period, 'Jan period', value, 0))
    Hope that helps,
    Rod West

  • Taking display value for calculations using structures in Bex query

    Hi
    I am using Bex analyzer to do a simple report with two key figures ‘Sales’ and ‘Plans’ from cube and two more calculated key figures ‘Abs Deviation’ and ‘% error’. The report displays at category and product levels. Category is higher and one category contains multiple products.
    The simple formulas for the two calculated KF are,
    1. Abs Deviation = Abs (Sales – Plans).
    Abs Deviation is set with the property Calculate result as ‘summation’ to add up Abs deviations at product level to show at Category level.
    2. % Error = Abs Deviation / Plan.
    The issue is with the % Error value at category level. At product level, all the values are showing correctly.
    To illustrate the issue with a simple test case,
    CategryProductSale-PlanAbs Dev----%Error
    C1--P1--100-60---40--
    67%
    C1--P2---50120---70--
    58%
    C1 Total--150180---110--
    17%
    Observe that in the output the calculation for ‘%Error’ at product level is correct all the way. But the summary
    calculation for ‘Error%’ i.e. C1 total which is showing as 17% is wrong. The correct value as per the formula should be 110/180 = 61%.
    SAP, through OSS replied that it is not a bug but the default behavior of OLAP calculation. OLAP processor first calculates the formula for % Error and then shows the display value at C1 total for Abs Dev. Meaning, ‘% Error’ is calculated first and next the summation for Abs dev is displayed. Abs dev 110 at C1 level is only a display value but not the value taken for % Error at C1 level. Instead OLAP calculates the Abs Dev at C1 level by Total sale – Total plan = 180 – 150 = 30 and the % Error calculation takes this 30 value in the formula and gives % Error = 30/180 * 100 = 17% at C1 level. But 17% doesn't make any sense to the user. Further, to display value of 61% at % Error at C1, it is being advised that by defining two structures, I can force the calculation to take display value of 110 in the % Error calculation at C1 level by using the cell editor.
    Has any body tried to achieve similar result as above by defining two structures and cell editor in the query? If so, can you please throw some pointers of how to define two structures in a query and how to force the % Error at category level to take the display value of 110 in the calculation? I have gone through the documentaion on structures and cell editor but the approach is not at all clear.
    Thanks in advance for your suggestions.
    Prasad
    Unilever Asia IT department

    Hi,
    Have u read aabout the Formula Collision.
    Take a look on this link .
    http://help.sap.com/saphelp_bw32/helpdata/en/d2/02223c5f00612be10000000a11402f/frameset.htm
    Read the Formula Collision, and let us know , whether your pb is solved by changing the Formula Collision of % error formula.
    With rgds,
    Anil Kumar Sharma .P
    Kindly assign points , If it really helps you.

  • Color coded calculated list column in content query web part

    I have a calculated column in a list for displayig color coded values using the link
    http://blog.splibrarian.com/2012/06/06/using-calculated-columns-to-add-color-coding-to-your-sharepoint-lists/
    Now for rollup i am using the lists to display them in a content query web part so i have updated the .webpart file and imported and added, made changes in the item style and uploaded ad finally inserted the web part in the page.
    But while diplaying hte custom column, it is being eing displayed as
    string;#<DIV style='font-weight:bold; font-size:24px; color:green;'>•</DIV>
    As you can notice it has appended string;# before the text. How do i avoid this? Thanks

    <xsl:value-of-select="@RAG" disable-output-escaping=“yes”
    />

  • Retrieving Detailed Calculation in a group by query

    I am writing a query that has a calculation based on an ID column or every detailed record in the table, but the output/report needs to be grouped by another column. The calculation is days_open/count(*). The days_open column is a field in the table.
    The output should be
    Case Type Avg_days_open
    A 20
    B 31
    C 34
    D 55
    The days open column in the table is structured like this:
    ID Days_Open
    1 34
    2 10
    3 23
    My query below is retrieving dupes per case type.
    select a. case_type_cd,
    days_between_sum/count(*) avg_days_pending
    from tab a,(select distinct case_type_cd, Days_Between days_between_sum from tab ) d
    WHERE FILED_DT between to_date(:BEGIN_Dt,'mm/dd/yyyy') and to_date(:END_Dt,'mm/dd/yyyy')
    and reporting_nr like :RID and federal_state = :FEDERAL_STATE
    and description is null
    and d.case_type_cd(+) = a.case_type_cd
    GROUP BY a.case_type_cd, days_between_sum

    Case Type case_nbr determination_dt Filed_dt
    A 123 10/02/2005 09/09/2005
    B 222 09/01/2004 07/01/2004
    C 094 01/01/2006 11/23/2005

  • Help assigning a   calculated arbitrary  ID to a query result set

    Given the sample query result..
    (sorry about the formatting of the output)
    GROUPID LAST_NAME FIRST_NAME INITIALS EMAIL PHONE count(PHONE)
    GP2001 Troy Diana s [email protected] 123-456-7890 2
    GP2001 Troy Diana s [email protected] 123-456-7890 2
    GP2006 Thomas Carl p [email protected] 789-100-1112 1
    GP2007 Riker William T [email protected] 866-908-6654 1
    GP3001 Laforge Jody m jlaforge@enterprisenet 456-789-9000 3
    GP3001 Laforge Jody m [email protected] 456-789-9000 3
    GP3001 Laforge Jody m [email protected] 456-789-9000 3
    GROUP_ID is a calculated field from a select statement.
    Individuals with one phone number (ph_cnt = 1)
    is assigned an arbitrary unique GROUP_ID.
    Individuals, appearing more than once, with more than one phone (ph_cnt > 1)
    are giving the same GROUP_ID.
    I was thinking of using a case statement in this case...but got stuck on generating the GROUP_ID based
    on the phone count.
    select case
    when ph_cnt = 1 then select 'GP'||to_char(sysdate,'hhmisssss') from dual)
    when ph_cnt > 2 then <assign a unique group_id to each set of duplicates/triplicate...etc>
    end GROUP_ID,
    last_name,
    first_name,
    initials,
    email,
    phone
    (select last_name,
    first_name,
    initials,
    email,
    phone,
    count(phone) ph_cnt
    from my tab
    group by
    last_name,first_name,initials,email,phone)
    Edited by: ch**** on Apr 25, 2011 7:20 AM

    Try this,
    SELECT 'GP' || 1000 + DENSE_RANK () OVER (ORDER BY phone ASC) groupid,
           last_name,
           first_name,
           initials,
           email,
           phone,
           COUNT (1) OVER (PARTITION BY phone) ph_cnt
      FROM my tab;G.

  • Calculating Vacation Days using a query

    Hi everyone. I have an issue with the following query provided by Pollywog. He did a great job on it however there is a bit of a problem in the way it operates. What it does is calculate the number of days for this year excluding saturday and sunday. It also has a cutoff date, July 1st. This is where the problem lies.
    Currently if the user chooses a vacation day that includes the cut off date. So from june 30th to july 5th it doesn't bundles it together and calculates it into the next year total. So if you have a vacation from June 15th to July 2nd it all goes into your next year's vacation days.
    What I want is to have this year's vacation days be calculated into this year and next year to be calculated into next year. So if you have the June 15th to July 2nd vacation it would add 11 days to This year's total and 2 days to next year's total.
    WITH t AS (  SELECT id,
                        MAX (strt) strt,
                        MAX (finish) finish,
                        SUM (dys) days_off
                   FROM (SELECT id,
                                strt,
                                finish,
                                CASE
                                   WHEN TO_CHAR (dy, 'day') LIKE 'saturday%' THEN 0
                                   WHEN TO_CHAR (dy, 'day') LIKE 'sunday%' THEN 0
                                   ELSE 1
                                END
                                   dys
                           FROM vacations
                         MODEL
                            PARTITION BY (ID id)
                            DIMENSION BY (0 d)
                            MEASURES (POCETAK strt, KRAJ finish, POCETAK dy)
                            RULES
                               (dy [FOR d FROM 1 TO finish[0] - strt[0] INCREMENT 1] =
                                     (NVL (dy[CV () - 1], dy[CV ()]) + 1)))
               GROUP BY id
               ORDER BY id)
    SELECT t.id,
           t.strt,
           t.finish,
           t.days_off,
           vacations.korisnik,
           SUM (
              CASE
                 WHEN finish < TO_DATE ('01/07/2011', 'dd/mm/yyyy') THEN days_off
                 ELSE 0
              END)
           OVER (PARTITION BY vacations.korisnik ORDER BY t.id)
              this_years_running_total,
           SUM (
              CASE
                 WHEN finish < TO_DATE ('01/07/2011', 'dd/mm/yyyy') THEN days_off
                 ELSE 0
              END)
           OVER (PARTITION BY vacations.korisnik)
              this_years_grand_total,
           SUM (
              CASE
                 WHEN finish >= TO_DATE ('01/07/2011', 'dd/mm/yyyy')
                 THEN
                    days_off
                 ELSE
                    0
              END)
           OVER (PARTITION BY vacations.korisnik ORDER BY t.id)
              next_years_running_total,
           SUM (
              CASE
                 WHEN finish >= TO_DATE ('01/07/2011', 'dd/mm/yyyy')
                 THEN
                    days_off
                 ELSE
                    0
              END)
           OVER (PARTITION BY vacations.korisnik)
              next_years_grand_total
      FROM t, vacations
    WHERE t.id = vacations.idLooking forward to any ideas you can offer

    hi,
    You need to write a code to get the key figure and characterstics value.
    First step is to defined the structure of all the field that you want to read.
    This table I_AXIS_DATA will contain the characterstics.
    This table I_CELL_DATA will contain the keyfigure.
    Please find the code.
                READ TABLE I_AXIS_DATA INTO WA_AXIS_DATA WITH KEY AXIS = '001' .
                IF SY-SUBRC = 0.
                  LOOP AT WA_AXIS_DATA-SET INTO WA_SET.
                        INDEX = INDEX + 1.
                        IF WA_SET-CHANM = 'infoobject name'.
                          WA_ROW_COL-fields = WA_SET-CHAVL_EXT .
                        ENDIF.
                        IF WA_SET-CHANM = 'infoobject name'.
                          WA_ROW_COL-field2 = WA_SET-CHAVL_EXT.
                        ENDIF.
                  ENDLOOP.
                ENDIF.
    ******* POPULATE COLUMNS AGAINST ROWS
                CLEAR WA_ROW_COL.
                V_COUNT = 1.
                INDEX = 1.
                LOOP AT IT_ROW_COL INTO WA_ROW_COL.
                  WHILE ( V_COUNT <= V_NUMOFKEYF ).
                        READ TABLE I_CELL_DATA INTO WA_CELL_DATA INDEX INDEX.
                        IF V_COUNT = 1.
                          WA_ROW_COL-keyfigure = WA_CELL_DATA-FORMATTED_VALUE.
                        ENDIF.
                        V_COUNT = V_COUNT + 1.
                        INDEX = INDEX + 1.
                        CLEAR WA_CELL_DATA.
                  ENDWHILE.
                  APPEND WA_ROW_COL TO IT_R_C_H.
                  V_COUNT = 1.
    Hope this is helpful.
    Thanks,
    Saveen Kumar

  • Statistics & Tune query

    Hi,
    Friends, I need some help.
    I have to tune some queries.
    1. How to find the last STATISTICS generation date?
    2. How generate statistics in database level?
    3. What is the difference between
    >alter table emp compute statistics;
    and
    >alter table emp estimate statistics;
    Can Any one give some good advice to tune queries?
    regards
    Mathew

    Hi,
    Friends, I need some help.
    I have to tune some queries.
    1. How to find the last STATISTICS generation
    date?
    query view USER_TABLES/DBA_TABLES, column LAST_ANALYZED
    2. How generate statistics in database level?Use
    ANALYZE TABLE <table_name> <statistic_collection_method>
    Or
    DBMS_STATS package
    3. What is the difference between
    alter table emp compute statistics;and
    alter table emp estimate statistics;
    Should be ANALYZE TABLE emp compute statistics;
    and ANALYZE TABLE emp estimate statistics;
    Compute statistics will sample all data of the table,
    estimate only sample certain percent of data of the table.
    ny one give some good advice to tune queries?
    Oracle Performance Tuning Guide
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14211/toc.htm

  • BW statistics: unassigned query in the USER QU

    Hi,
    We turned the bw statistics on. When we looked the User Query Stats report( use the 0BWTC_C02). There are lots of unassigned queries if we drilll down on the query. Does anyone know why there are unassigned queries? What does the unassigned query mean here? Also further drill down on the infoCube, there are also unassigned infoCubes listed as well? Anyone experiences this?
    Thanks
    JXA
    Query                    InfoCube       User          Frequency       User
    A/Not assigned           A/Not assigne      JSmith          6               1

    Thanks Gopikrishna. Let me explain what I mean "unassigned".
    In the USER QUERY STATS report. If we drill down by the query name, the first one listed is the A NOT assigned, then followed by real query names. About 50% of the navigation are listed under the A NOT assigned query.
    Why is a query assigned improperly after initial step? Can we do something to correct this?
    Thanks!

  • Calculating total time from a query

    Hi everyone,
    I have a simple database and one of the fields in this
    database is time spent on stuff, for example a bike ride lasted
    00:45:00, 01:33:03, 01:23:03 ETC
    what I am trying to do is calculate total time. so do a sum
    of that column.
    Simple enough.
    the column is a VarChar, I tried Time as well and well that
    did not go well.
    if I use mysql command line I get this:
    mysql> SELECT SUM(mv_time) FROM data WHERE user_id = 2;
    +--------------+
    | SUM(mv_time) |
    +--------------+
    | 8 |
    +--------------+
    1 row in set (0.00 sec)
    No idea how it came up with that one as 8 is incorrect
    so I got a bit fancier:
    mysql> SELECT SEC_TO_TIME(SUM(TIME_TO_SEC(mv_time))) AS
    mv_time FROM data WHERE user_id = 2;
    +----------+
    | mv_time |
    +----------+
    | 26:14:58 |
    +----------+
    1 row in set (0.00 sec)
    Bingo that is correct.
    but if I use that same query within cfquery I get a nice java
    error telling that you can't have 26 hours in a single day.
    Any ideas how I can accomplish this should be simple task?
    Thank you.
    Luc

    Hi Cf_dev2,
    How would I go about making easy for my users to submit the
    seconds into the database?
    for example I would want them (them being me really :) ) to
    enter 01:35:00 (for one hour and 35 minutes) and then have CF or
    SQL convert that to seconds (instead of having myself figure that
    out manually I am no good at math)
    Jdeline, I don't understand what you mean by not storing it
    as comma delimited, as far as I know its not comma delimited, its
    stored in a table called data along with a primary key id, userid,
    date, etc
    Thanks
    Luc

  • How to show "calculated" InfoObject / characteristic with-in query level

    Dear Expert:
    I have infoObject which is a CHAR(1) and contain only 3 values
    "1"
    "2"
    "3"
    But I want the query to show only CHAR(1)
    "1" as "N"
    "2" as "N"
    "3" as "Y"
    Is there any way to do this ?
    Points will be rewarded
    Regards,
    Ahmad.

    Hi William:
    The display attribute is another InfoObject right ? So I have to create an update rule to update the infoObject from whatever InfoSource I have ...
    Am I correct ?
    If I were correct, then It's quite an expensive process as I have to do some development and prepare a lot of documentation
    Thank you for your time anyway

  • Table Statistics Gathering Query

    Hey there,
    I'm currently getting trained in Oracle and one of the questions posed to me were create a table, insert a million rows into it and try to find the number of rows in it. I've tried the following steps to solve this,
    First table creation
    SQL> create table t1(id number);
    Table created.Data insertion
    SQL> insert into t1 select level from dual connect by level < 50000000;
    49999999 rows created.Gathering statistics
    SQL> exec dbms_stats.gather_table_stats('HR','T1');
    PL/SQL procedure successfully completed.Finally counting the number of rows
    SQL> select num_rows from user_tables where table_name='T1';
      NUM_ROWS
      49960410
    SQL> select count(*) from t1;
      COUNT(*)
      49999999My database version is,
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for 32-bit Windows: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - ProductionI would like to know why there are two different results for the same table when using "num_rows" from the view "user_tables" and the aggregate function "count()" over the same table. Please do keep in mind that i'm studying oracle and this is from a conceptual point of view only. I would like to know how gathering the table statistics works using dbms_stats package works.
    Thank You,
    Vishal

    vishm8 wrote:
    Gathering statistics
    SQL> exec dbms_stats.gather_table_stats('HR','T1');
    PL/SQL procedure successfully completed.I would like to know why there are two different results for the same table when using "num_rows" from the view "user_tables" and the aggregate function "count()" over the same table. Please do keep in mind that i'm studying oracle and this is from a conceptual point of view only. I would like to know how gathering the table statistics works using dbms_stats package works.
    Thank You,
    VishalBecause you aren't specifying a value for estimate_percent in the procedure call (to gather_table_stats) Oracle will pick an estimate value for you. If you want to sample the entire table you would need to explicitly specify that in your procedure call.
    http://download.oracle.com/docs/cd/E11882_01/appdev.112/e16760/d_stats.htm#ARPLS68582

  • Help needed in calculations in Workbook for input query

    hi friends ,
    Iam displaying an input query in the Workbook ..the format of the query is
    Account                                  Amount
    1010 Undistributed Amount     $ 2000
    1010 PC1
    1010 PC2
    1010 PC3
    The use 0f this query is to distribute the undistributed amount for below 3 profit centers .When a amount is entered for PC1,the entered amount must be reduced from the undistributed amount .Bottom line is the undistributed amount must be refreshed everytime an amount is entered for PC1,PC2,PC3 and vice versa ..
    I tried writing some excel formulas but no use .when the query is in edit mode i was not able to write the formulas to the cells.
    Please give me your valuable inputs and help me getting this function work.
    Regards,
    Ravikanth

    Hi,
    We acheive the same requirement in our project by creating one more characteristic which will be derived from the changed record .You can refer the How to guide given below.Once you get the delta record then you can redistribute the same by using the FOX formula,taking the derived characteristic into aggregation level and checking for it's value.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/a05666e5-91bf-2a10-7285-a80b7f5f7fd2&overridelayout=true
    For example: one WBS element span across three periods ,initially all with same amount ,if I change the value for one period the remaining amount should be equally distributed in remaining periods.Special characteristic value is "A" intially.Now if i change the amount for 010.2009 to 100,the remaining 500 should be equally distributed.
    HEADER LINE.
    WBS,Period,Zdelta,Amount
    WBS1 010.2009  A  200
    WBS1 011.2009  A  200
    WBS1 012.2009  A  200
    Now when I change the amount from 200 to 100 the negative delta will be posted to ZDELTA as"X" with the value -100.So now in the cube the records will be like:-
    WBS1 010.2009  A  100
    WBS1 010.2009  X  -100
    WBS1 011.2009  A  200
    WBS1 012.2009  A  200
    Now you can write the fox formula in which you can check the total amount will be less than the original amount.So now you can post the remaining amount to the records where ZDELTA dose not have the value X.
    Hope this may work out for you.
    Regards,
    Indu

Maybe you are looking for

  • To go for SAP PS module or not to go?

    Hi All, There is a saying "better to be late than never". I Akash B.E(Mech.) though having extreme inclination towards software industry opted for industrial work 12years back and worked hard to retain there. But my urge towards computers is drawing

  • Ship to address required for non-billable items?

    Hi We are using order management but all our items are non-billable items. Orders are for Adverts in Magazines/Newspapers therefore not tangible items. Is it mandatory to assign Ship-to address to all our customers? We are not doing any shipping. How

  • Will the XSATA device for Xbox 360 work w/ Tiger?

    There is a device that allows transfers via USB 2.0 between the Xbox 360 and a PC called XSATA. I'm wondering if it will work with my iMac G5 running Tiger. Anyone? iMac G5 1.8GHz 160 GB   Mac OS X (10.4.1)  

  • How to use BC adapter

    Dear Friends,    This is Shalini,                  My Requirement is Third party system is sending the Purchase Order in XML file they are using Business connectors. They are sending the PO to XI System , from XI  that PO's sending TO R/3 System Afte

  • Ipod loses artwork from random albums

    I have a black 160GB iPod Classic with the 1.1.2 software synced to a Macbook Pro running iTunes 8. All ~60000 tracks in my iTunes library have artwork that I have manually added, and I sync about 9000 of these tracks to the iPod. All the artwork can