Line calculation

Hi all

Any help is appreciated

I have a query that calculates the R_square for all 4 lines A

When I do the calculation of request for the 4 first lines is the correct calculation

Rowset is the miscalculation (lines 13 and 14) is filling 0.9537 instead of 1

I checked the calculation using the formula Rsquare Excel spread sheet
SELECT a.*,
       REGR_R2 (average, prof) OVER (partition by region ORDER BY rn
                                     ROWS BETWEEN CASE WHEN MOD (rn, 4) = 0
                                                            THEN 3          -- Not 3
                                                       WHEN rn_desc = 1
                                                            THEN  MOD (rn, 4)
                                                       ELSE  0
                                                  END  PRECEDING
                                           AND CURRENT ROW) AS r_square 
FROM   (select b.*,
               row_number() over (partition by region order by b.a) rn,
               row_number() over (partition by region order by b.a desc) rn_desc
        from   tableaa b
       ) a
ORDER BY  region,a.a;
        A     BEG     END     PROF     AVERAGE     REGION     RN     RN_DESC     R_SQUARE          
1     1     0     0.1     159     159     1     1     9               
2     2     0.1     0.2     159     168     1     2     8               
3     3     0.2     0.3     179     159     1     3     7               
4     4     0.1     0.2     250     300     1     4     6     0.935800848     0.935800848     RSQ(F2:F5,E2:E5)
5     5     0.2     0.3     320     250     1     5     5               
6     6     0.3     0.4     250     380     1     6     4               
7     7     0.2     0.3     388     379     1     7     3               
8     8     0.3     0.4     379     388     1     8     2     0.02893956     0.02893956     RSQ(F6:F9,E6:E9)
9     9     0.4     0.5     599     200     1     9     1     1          #DIV/0!          RSQ(F10,E10)
10     10     1.5     0.6     499     500     2     1     5               
11     11     0.5     0.6     420     448     2     2     4               
12     12     0.6     0.7     520     530     2     3     3               
13     13     0.7     0.8     540     550     2     4     2     0.973967815     0.973967815     RSQ(F11:F14,E11:E14)
14     14     0.9     1     560     570     2     5     1     1          #DIV/0!          RSQ(F15,E15)
When I do separately I get what excel shows correct value

Select REGR_R2 (average, teacher) of tableaa b
where region = 2 and one in (10,11)

REGR_R2 (AVERAGE, TEACHER)




create table TABLEAA
(
A NUMBER,
PLEASE THE NUMBER,
NUMBER OF END,
NUMBER OF TEACHER,
AVERAGE NUMBER,
THE REGION NUMBER
)
;

Fast loading TABLEAA...

insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (1, 0,.1, 159, 159, 1);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (159, 168, 1 2,.1,.2,);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (3,.2,.3, 179, 159, 1);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (4,.1,.2,, 250, 300, 1);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (5,.2,.3, 320, 250, 1);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (6,.3,.4,, 250, 380, 1);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (7,.2,.3, 388, 379, 1);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (8,.3,.4,, 379, 388, 1);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (9,.4,.5, 388, 400, 1);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (10, 499, 500, 2 1.5,.6,);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (11,.5,.6, 420, 448, 2);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (12,.6,.7, 520, 530, 2);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (13,.7,.8, 540, 550, 2);
insert into TABLEAA (A, START, END, TEACHER, MEDIUM, REGION)
values (14,.9, 1, 560, 570, 2);
commit;

Thanks for the data!
My test:

SQL>r
  1  SELECT a, prof, AVERAGE, region,
  2         CASE
  3            WHEN MOD(rn, &&s) = 0 OR next_a IS NULL
  4            THEN REGR_R2(AVERAGE, prof) OVER(PARTITION BY region ORDER BY rn ROWS BETWEEN MOD(rn - 1, &&s) PRECEDING AND CURRENT ROW)
  5         END AS r_square
  6    FROM (SELECT a, prof, AVERAGE, region, ROW_NUMBER() OVER(PARTITION BY region ORDER BY a) AS rn,
  7                 LEAD(a) OVER(PARTITION BY region ORDER BY a) AS next_a
  8*           FROM TABLEAAA) a
old   3:           WHEN MOD(rn, &&s) = 0 OR next_a IS NULL
new   3:           WHEN MOD(rn, 10) = 0 OR next_a IS NULL
old   4:           THEN REGR_R2(AVERAGE, prof) OVER(PARTITION BY region ORDER BY rn ROWS BETWEEN MOD(rn - 1, &&s) PRECEDING AND CURRENT ROW)
new   4:           THEN REGR_R2(AVERAGE, prof) OVER(PARTITION BY region ORDER BY rn ROWS BETWEEN MOD(rn - 1, 10) PRECEDING AND CURRENT ROW)

         A       PROF    AVERAGE     REGION   R_SQUARE
---------- ---------- ---------- ---------- ----------
         1        195         60          1
         2        185         93          1
         3        153        198          1
         4         92         79          1
         5        109         93          1
         6        133         89          1
         7        100         90          1
         8         92        103          1
         9        134         83          1
        10        168         74          1 ,001246769
        11         92         80          1
        12        184        117          1
        13        143         89          1
        14         80         94          1
        15        125         92          1
        16        108         85          1
        17         82         81          1
        18         84         88          1
        19        103        103          1
        20         89         73          1 ,492600029
        21        103         84          1
        22        112        119          1
        23         89         94          1
        24         91        110          1
        25        136        104          1
        26         85        106          1
        27        148         88          1
        28         91         87          1
        29        108        103          1
        30        101        118          1 ,014994374
        31         87         67          1
        32         82         86          1
        33         98        100          1
        34         93        107          1
        35        130         81          1
        36        106        129          1
        37        108         90          1
        38         92        115          1
        39        117        131          1
        40        112        101          1 ,041102439
        41        107         87          1
        42        126         76          1
        43         99         65          1
        44        129         70          1
        45        138         92          1
        46        111         82          1
        47        103         64          1
        48        111         60          1
        49         92         71          1
        50        116         74          1 ,227493634
        51        122         73          1
        52         85         87          1
        53         90         70          1
        54         76         78          1
        55         95         69          1
        56        123        102          1
        57         76         82          1
        58        193        107          1
        59        168        144          1
        60        101        111          1 ,453906354
        61        254        111          1
        62         83         88          1
        63         80        103          1
        64         80         82          1
        65         86         89          1
        66        101         90          1
        67         90         75          1
        68         93        100          1
        69         78         84          1
        70         84         98          1 ,374792811
        71        100         60          1
        72        140         60          1
        73         72         93          1
        74        101        198          1
        75         92         79          1
        76         82         93          1
        77         77         89          1
        78         77         90          1
        79         95        103          1
        80         89         83          1 ,012023849
        81        106         74          1
        82        128         80          1
        83         99        117          1
        84         74         89          1
        85        145         94          1
        86        115         92          1
        87         65         85          1
        88         70         81          1
        89         74         88          1
        90         72        103          1 ,000034639
        91         74         73          1
        92         99         84          1
        93        215        119          1
        94         74         94          1
        95         70        110          1
        96        113        104          1
        97         82        106          1
        98        139         88          1
        99         83         87          1
       100         80        103          1 ,195184476
       101         86        118          1
       102         94         67          1
       103         82         86          1
       104         63        100          1
       105         84        107          1
       106        145        131          1
       107         95        109          1
       108        104         87          1
       109         94        162          1
       110         87         99          1 ,084601225
       111        170         87          1
       112        176         76          1
       113        125         65          1
       114        233         70          1
       115        148         92          1
       116        108         82          1
       117        168         64          1
       118        161         60          1
       119        193         71          1
       120        256         74          1 ,024359842
       121        205         73          1
       122        197         87          1
       123        313         70          1
       124        269         78          1
       125        154         69          1
       126        158        102          1
       127        120         82          1
       128        111        107          1
       129        132        144          1
       130        141        111          1 ,317788364
       131        124        111          1
       132        209         88          1
       133        152        103          1
       134        138         82          1
       135        236         89          1
       136        226         90          1
       137        296         75          1
       138        302        100          1
       139        343         84          1
       140        193         98          1 ,240257995
       141         76         60          1
       142         95         60          1
       143        123         93          1
       144         76        198          1
       145        193         79          1
       146        168         93          1
       147        101         89          1
       148        254         90          1
       149         83        103          1
       150         80         83          1 ,031164927
       151         80         74          1
       152         86         80          1
       153        101        117          1
       154         90         89          1
       155         93         94          1
       156         78         92          1
       157         84         85          1
       158        100         81          1
       159        140         88          1
       160         72        103          1 ,001541019
       161        101         73          1
       162         92         84          1
       163         82        119          1
       164         77         94          1
       165         77        110          1
       166         95        104          1
       167         89        106          1
       168        106         88          1
       169        128         87          1
       170         99        103          1 ,285490096
       171         74        118          1
       172        145         67          1
       173        115         86          1
       174         65        100          1
       175         70        107          1
       176         74         81          1
       177         72        104          1
       178         74         99          1
       179         99        110          1
       180        215        125          1 ,014405909
       181         74        103          1
       182         70         90          1
       183        113         77          1
       184         82        101          1 ,591180806

184 rows selected.

SQL>

URS

Tags: Database

Similar Questions

  • Disable access to the lines calculated in 11.1.2

    Hello

    I use a v11.1.2 of EPMA planning application using calculation Manager to create the business rule.

    In fact, I have a very simple request to disable (write) access to the cells, calculated by the business rule.

    This option is automatically made to the calculated by the formula of Member members. is it possible to do for calculated members by business rules rather than derivative of the cell by the validation rule.

    Thanks in advance.

    If you have a member that you want to write in a form a reading in there, you have a few options:
    (1) set the line or column must be set to read-only - in order to mix it with the accessible elements in writing, you must configure a separate section.
    2) there is an option to set an entire form read-only.
    (3) finally well advised against it, you could do a dynamic account which was equivalent to the other account - no real need to do so - you should doe #1.

    Kind regards

    John A. Booth
    http://www.metavero.com

  • How to get the data of the fourth entry line

    I have the view that is shown in the table, where to calculate individual lines based on the information of previous line using resume.. I have a line calculated during execution, in which it requires data on the next line. How can I do

    If you are using an Oracle database, you can use the LEAD function within an OBIEE EVALUATE function:
    http://obiee101.blogspot.com/2007/12/OBIEE-evaluate-function.html

    Concerning

    John
    http://obiee101.blogspot.com

    Published by: John Minkjan, November 13, 2008 08:59

  • 16 bit CRC IBM

    Hello

    I'm new to CRC calculation and currently having difficulties to find the Labview live that I can use for the calculation.  I was able to find and use a calculator online CRC to generate correct values, however I could not find any Labview VI that generates values that correspond to the online calculator. See the link: http://www.lammertbies.nl/comm/info/crc-calculation.html

    I am using CRC-16-IBM. I found a VI that seems applicable, but I don't know how to use it.  All my attempts here to a CRC calculation with the vi has failed. Perhaps, it is not the good vi or I'm doing something wrong.   Please try to see if you can use the VI and generate corresponding values with the on-line calculator of the CRC. See attachment.

    Thank you

    I had to do some research to figure out what was the real polynomial (actually lied here).  But then looking at the code, I came up with this.  Certainly, the lookup table will be faster because many of these calculations are predone.

  • With the help of the previous line in a formula calculator

    Hello.  I use the calculator to create a new string that is a custom filtered version of an existing channel.  Unfortunately, I was not able to identify the entrance of previous line in the channel.  To make things easier, let's say my filter is a simple averager.  This is simple pseudocode for what I want to do:

    New_Channel = (Existing_Channel [n] + Existing_Channel [n-1]) / 2

    where n is the current line.

    It's the calculator formula, with I came:

    ch("[1]/New_Channel") = (CHD (' chnRow - 1 ' [1] / Existing_Channel "") + ch("[1]/Existing_Channel")) / 2 + CTNV (chnRow > 1)

    Unfortunately, I think that chnRow returns 0.

    Of course, I'm a beginner.  I'm open to other approaches to the creation of a new channel with a custom filter.

    Thank you!

    Hi jbuttron,

    What you need to do is to copy the channel and remove the first value of the copied channel then the nth line of the original channel is aligned on the e line (N-1) of the copied string.  You must also add the last value of the string copied at the end of this channel as a new value that both channels end up with the same channel width.  Now you can reference the channels with Ch("[1]/old") and Ch("[1]/new") in the expression of canal's calculator, assuming that the channel names are 'old' and 'new' respectively and both are in the first group.  You need not row variable in the expression now, which is good because there is no way to iterate through a variable row in an expression of canal's calculator.  The iteration of the row is implicit in the reference channel Ch("[1]/new").

    Brad Turpin

    Tiara Product Support Engineer

    National Instruments

  • calculation on line data

    Hello world

    I have just started using the tiara and I have no idea how I can do a few calculations, I want to have chanell with result depends on the other chanells, but not the same data line, I can use the SMC (line, no.) and I can do to make it function in a cell with my result chanell (example for the first row of data (: SMC (1, Ch("[4]/Channel1")) = (ChD (1, Ch("[4]/Channel")) + SMC (2, Ch("[4]/Channel"))) / 2), but I don't know how I can do this function automatically for the other line (for example, line 2 ChD (2, Ch("[4]/Channel1")) = (ChD (2, Ch("[4]/Channel")) + SMC (3, Ch("[4]/Channel"))) / 2) I have a line of 500,000 of data so I need know some functions that will be clalculated this function on the lines of my data. I will be grateful for your help.

    Hello!

    For performance of good calculations on your data of type long, you must use a formula in tiara. In the past, it was the FormulaCalc command. Today, the ChnCalculate is recommended. The similar oddity in the two commands, they can only do calculations on one line (it's repeat them verry fast for all lines). For you the problem this behavior results in a no aproach obvoius. You must copy your data to a second channel, remove the number of values that gives your shift and then use the two channels for the calculation. Here's the script for offset = 1:

    Call ChnCopy("[1]/Channel","[1]/ChannelCopy")
    Call DataBlDel("[1]/ChannelCopy", 1, 1)
    Call ChnCalculate("Ch(""[1]/Result"" )= Ch(""[1]/Channel"" ) + Ch(""[1]/ChannelCopy"" )/2")
    

    Matthias

  • automatic calculation of new line is not fire

    I have a table, when I add new lines, then automatic calculation is not fire.

    Page edit >code to run when the Page loads

    $('input[name=f04]').change( function(){
      parent_row = $(this).parents('tr:first');
      sal = ( parent_row.find('input[name=f04]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f04]').val() );
    //  comm = ( parent_row.find('input[name=f08]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f08]').val() );
      total = sal * sal;
      parent_row.find('input[name=f05]').val(total);
    });
    

    workspace: ram_r & d

    username/password: aramani/apex

    App: https://apex.oracle.com/pls/apex/f?p=29288:1:6747878971079:

    That's because. change() is an affair of a Manager on the only existing items. The event must be implemented in such a way that it fires for each element, existing and new. You can do so using. on() with specifying a container element manipulation. http://API.jQuery.com/on/

    For example:

    $(document).on('change', 'input[name=f04]', function(){
      parent_row = $(this).parents('tr:first');
      sal = ( parent_row.find('input[name=f04]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f04]').val() );
    //  comm = ( parent_row.find('input[name=f08]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f08]').val() );
      total = sal * sal;
      parent_row.find('input[name=f05]').val(total);
    });
    

    Or just use a dynamic action and define the scope of "dynamic". Just as clean. Instead of "this", you use "this.triggeringElement".

    Interesting help on the "scope of the event:

    This is an advanced property allows you to specify the scope of the event. The options are:

    • Static (default) - bind the event handler for the triggers for the lifetime of the current page, but it will be linked is no longer if the precipitating elements are updated via partial refresh (PPR) Page.
    • Dynamics - bind the event handler for the triggers for the lifetime of the current page, including all the triggers that are re-created through the Page partial refresh (PPR).
    • Once - binds the handler for the elements for a single event triggers.

    And static container:

    You can improve the performance of dynamic Action that has an 'extended event"of"Dynamic", by defining a container 'Static '. It is an element on the page that itself does not get recreated, but contains triggers that are re-created via partial refresh (PPR) Page. This reference of the element must be defined as a jQuery selector.

    For example if you have a dynamic Action that does something to the lines of an interactive report region (which are re-created by PPR), it would need a 'Scope event' 'Dynamic', so that the dynamic Action to work once again, the report has been updated. And here, the 'Static Container' value can be assigned to a jQuery selector, select the static value of 'ID' in the region, for example: "#my_region."

    Who all described fairly well what was written on the jquery documentation, too.

    This is the code for the actual action of "Execute javascript code:

    parent_row = $(this.triggeringElement).parents('tr:first');
    sal = ( parent_row.find('input[name=f04]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f04]').val() );
    //  comm = ( parent_row.find('input[name=f08]').val() == ' ') ? 0 : parseFloat(parent_row.find('input[name=f08]').val() );
    total = sal * sal;
    parent_row.find('input[name=f05]').val(total);
    

    I edited your page to use the dynamic action and put your original code in the comments on the page.

  • Order form does not update grand total calculation until I have indicate a number on the next line.

    I created a purchase order with a "quantity" column, a column of job description, a unit price column and a point $ column total. I've set the total column of $ point to calculate automatically once a quantity and unit price entered, and it works immediately once the unit price and quantity entered. But my grand total at the bottom of the total column $ is set to calculate all the lines of total $ point, but the total general don't not updated to reflect the $ total for a given line (e.g. line B) until I have begin to type a number for the next line (e.g. line C). So, I always end up having to create a line of extra reserved space with a quantity of 0, just to get my total general to update. Is there a way to fix this?

    It is most likely a problem with the calculation of field order. You must ensure that the total is calculated after row grand totals.

    This can be set in form editing mode, under the order of computation of Set field - other tasks.

  • Calculation floating field adds unwanted line break

    Using Livecycle Designer ES4 w / Javascript

    I have a numeric field PurchasePrice and a float DepositAmt field which is calculated using the this.rawValue = PurchasePrice.rawValue *. 3;

    In Design view, the container DepositAmt line looks like this:

    • 30% or {DepositAmt} thereby signed as a deposit;

    Preview the line looks like this:

    • 30% or

    with the agreement signed as a deposit;

    And after that a number entered PurchasePrice it looks like this:

    • 30% or 1 $000,00

    with the agreement signed as a deposit;

    I have other lines with '30% to include... '. "and no return is added.

    I have removed the line and retyped it

    I deleted the floating field and recreated

    I tried FormCalc with the same result

    Thanks in advance for any help!

    R

    I had various problems with floating fields, mainly with extra spaces being placed before and after a currency field. For example, I had an extra space between the field and the punctuation immediately following floating.

    If you select the type of field as "Digital field" and then configures the model of what follows, it should help. Remember to remove the spaces before and after the field floating, as you add them to the model.

    30% or {DepositAmt} thereby signed as a deposit

    num {("$zzz zzz zzz, zzz, zz9.99' ')}

  • How to develop lines of a table of calculated value of a field

    Hello

    I'm defining the lines of an extendable table following the calculated value of a field.

    The calculated field comes from two date fields that are used to calculate the number of days and I want my table/line to expand depending on this number...

    Is is possible? At this moment I have a button that adds an instance "Admin_Use.Table3._Row1.addInstance (1);" but I want to be triggered by the calculated field to the place...

    Thank you very much!!!

    Hello

    Here is the form to the you: https://acrobat.com/#d=AmNfJzA-jGLL9-moO888IA.

    Have a look at the script of the calculate of the TotalDays event. Because you use the calculate event, it is important that you set the number of instances of the first line and the last line of the script in this case statement is setting the value of the object ($ = i).

    Hope that helps,

    Niall

  • Line numbers in the table in a calculated text field

    How calculated script works incrementally number a field calculated and return the number of lines in the field of the extreme left of a table?

    What I need, is that each row in the table is numbered consecutively in the area of the far left and that the new created lines are numbered correctly at the end of the user.

    Hello

    You have to move the script to the layout event: loan. This isn't the most effective event, because it triggers every time changes. For this reason however your needs well, because whenever a row is added or deleted, the index numbers will be updated.

    Here is an example letter (for a maximum of four lines). The same approach should apply to numbers. The script is located in the layout event: loan of the first cell.

    There is an example here: https://acrobat.com/#d=Zk2XWWDUWNfG * VuRTNy5QQ

    Good luck

    Niall

  • Line of additional tax offset after manual change of the calculated tax amount

    Hi all

    I have the following problem:

    If I manually change the amount of the calculated tax of a domestic Bill of AP in r12 system generates a second line of the tax as a tax from compensation so that the total tax is zero. The system proceeds even if the respective flag is not set for this provider. I can only finish erasing the link between tax compensation that is not a standard and permanent solution.

    Kind regards

    Carsten

    Hello

    See the following note in metalink:

    R12 - EBTax create new line of fiscal compensation when change the amount of the tax [ID 971555.1]

    Thanks and greetings
    Jeanny.

  • How to skip a line after the calculation of subtotals in SQLPlus listing reports?

    Hi guys,.
    I have a SQL * Plus list report and I would like to break after calculating subtotals after a group (on which I take a break on). Currently, I am to be able to make a jump after the Group of not after the subtotal line.


    Here's what the output is supposed to look like. I want that back after the Subtotal line distribution. Currently, sound not to do so.

    Any help would be appreciated.
                                             
     YEAR  DESCRIPTION  TYPE        AMOUNT     ID        PURPOSE              DATE        Allocated      Used   Not Allocated           
    ----- -----------  ----------- ---------- --------- -------------------- ----------  --------- ---------   -------------           
     2010 XXXXXXXXXXX  XXX         9,999.00   99999     XXXXXXXXXXXXXXXXXXXX 2010/01/01      13.50      3.50            0.00           
                                                                                                                                        
                                   ********** *********                                  --------- ---------   -------------           
                                   Sub-total:                                                13.50      3.50            0.00           
    
                       XXX         9,999.00   99999     XXXXXXXXXXXXXXXXXXXX 2010/01/01     108.50     80.50           28.00           
                                              99999     XXXXXXXXXXXXXXXXXXXX 2010/01/01      42.00     28.00           14.00           
                                              99999     XXXXXXXXXXXXXXXXXXXX 2010/01/01       1.00      1.00            0.00           
                                                                                                                                       
                                   ********** *********                                  --------- ---------   -------------           
                                   Sub-total:                                               151.50    109.50           42.00           
    
                       XXX         9,999.00   99999     XXXXXXXXXXXXXXXXXXXX 2010/01/01       4.00      4.00            0.00           
                                             99999      XXXXXXXXXXXXXXXXXXXX 2010/01/01       3.00      1.00            0.00           
                                             99999      XXXXXXXXXXXXXXXXXXXX 2010/01/01       6.00      6.00            0.00           
                                             99999      XXXXXXXXXXXXXXXXXXXX 2010/01/01       3.00      3.00            0.00           
                                                                                                                                       
                                   ********** *********                                  --------- ---------   -------------           
                                   Sub-total:                                                16.00     14.00            0.00           
    
    ***** **** ******* ************                                                      --------- ---------   -------------           
    Total                                                                                   181.00    127.00           42.00           
                                                                                                                                        
                                                                                                                                        

    Hello

    Add "SKIP 1" to the PAUSE command:

    BREAK   ON  amount      SKIP    1
    
  • Calculation of wise line %

    Hi Experts,

    I can't find a solution on the calculation of the percentage wise line.

    My requirement goes like this

    CUSTOMER - VALUE-%

    -7 CUSTA (7/21) * 100

    CUSTB - 5---(5/21) * 100

    CUSTC - 9---(9/21) * 100

    TOTAL - 21


    I can't calculate the PERCENTAGE.

    I use a pivot view...

    Please let me know your opinion on how to achieve...

    Appreciate your immediate response...

    -Thanks!

    Hello

    to rotate the view,
    Duplicate the VALUE column in the action block. Now, you will find 2 columns with the same name.

    And to duplicate column (2nd one), go to Options... more > show data as > percentage of > column.

    You will automatically find it calculates the value of %...

    Announcement if you want, you can change the title of the 2nd column in a precise way.

  • Calculation of line graph

    I use the Query Builder to create a line graph. But I want to use a calculation to one of the lines and the data comes from two fields in the same report. I'm not sure how exactly to do this calculation to work.

    Select the link null, label SAMPLE_TIME, FREE_BUFFERS_INSPECTED/Dirty_buffers_inspected "buffer free and salty.
    "DART". "" DART_BUFFER_POOL ".

    It accepts the code, but it says error, no graphic data available by looking at the actual graph. Is there a problem at the APEX of divide by 0? Don't know if this is causing the problem.

    Hello

    is there a problem at the APEX of divide by 0? : This is a problem general math , as something of division by 0 is usually a failure (or unknown).
    Try your query in SQLPlus to see if you get an error here too. If so, rewrite the 'Dirty_buffers_inspected' to
    DECODE (Dirty_buffers_inspected, 0, 0, FREE_BUFFERS_INSPECTED/Dirty_buffers_inspected)

    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this response in marking it as useful or Correct ;-)

Maybe you are looking for