Deriving from the value of the column totals

BI Publisher 11g:

I have the next report, that I generated:

BOX TYPE NUMBER OF BOXES COST COST PER BOX
A10$100$10
B20$140$7
TOTAL30$240$17

My problem is that in the TOTAL row in the column COST PER BOX, the value shouldn't be that is to say $17 ($10 + $7) it should be actually IE $8 ($240 / $30). Does anyone know how to calculate the correct value.

Assuming that this structure of xml data:

A

10

100

B

20

140

You can use the following code to get the values:

row1:  

row2: 

Thank you

Bipuser

Tags: Business Intelligence

Similar Questions

  • How to join two tables to retrieve the data from the columns in table two. Tables have primary and foreign key relationships

    Hello

    I want to join the two tables to retrieve the data from the columns of the two table passing parameters to the join query. Tables have primary and foreign key relationships

    Details of the table

    Alert-1 - AlertCode (FK), AlerID (PK)

    2 AlertCode-AlertDefinition-(PK)

    Help, please


    ----------

    Hi Vincent,.

    I think that you have not worked on adf 12.1.3.  In adf 12.1.3 you don't have to explicitly create the association. When you create the EO to your table, Association xxxxFkAssoc, will be created by ADF12.1.3 for you automatically. Please try this and do not answer anything... You can also follow the links below. I solved the problem by using the following link

    Oracle ADF Guide step by step - Oracle ADF tutorial: creating a relationship of the master / detail using Oracle ADF

    ---

  • How to sort the column total in pivot view

    Hello guys

    I have a report in pivot mode, where I put the call on the section of the column type. So the report looks to below with the AMOUNT applied to the section of the column:
                                       Call Type1         Call Type2       Call Type3               TOTAL
    ID                                        SALES TOTAL
    
    A                                  100                  200                300                       500
    B                                  200                  200                400                       800
    C
    D
    E
    My question, how can I sort the data in the field "TOTAL"? The challenge, seems, is that, since 'TOTAL' is not a column of the table, but just a screen of pivot Sum, it cannot be sorted H - L or L.-H...

    But I would like to get some advice from you guys before you do my conclusion

    Thank you

    Published by: user7276913 on January 11, 2010 10:05

    You can't have sorting on the PivotTable total.

    On a workaround solution.
    You can create a column in the criteria that calculate the sum

    SUM (sales_total by ID)

    Assign the sorting on this column order
    You can exclude this column in the PivotTable

    Kind regards
    Rambeau

  • Derives from the system time when calling OR-Motion screw on PXI controllers

    Hello

    Just an email to avoid others wasting time when they are facing in this fantasy bug:

    We use PXI systems with Controllers NI PXI running Windows 7 and the 7340 family cards (PXI-7344). We have noticed that when the calls when it's through screws OR-Motion to question the different registers of the State (e.g. position, ADC value, general axis or the reference state) axis, the (Windows) system clock runs FASTER either. OR-Motion calls most are performed per second, faster windows clock works. When you get into the status for 4 axes 10 times per second (lines 100 ms rate), the drift is greater than 5%!

    I include here an example of program that reproduces this behavior.

    It is an essential question, for example if save you data with or from the timestamps, and it gets even worse if Windows is configured to periodically synchronize its own clock to a server via the NTP Protocol (it's how we noticed this problem in the first place). In this case, you see large discontinuities in your data every once in a while. Our systems must be running automatically and record data continuously throughout the year, so this bug is a real challenge.

    People at NOR been able to reproduce this bug too and are working on it (no idea of any CAR # yet). Note that this problem has not been seen on a DC non - OR Office running Windows 7 64 bit...

    The exact configuration is the following:

    Chassis PXI-1036

    PXI-8101 (or PXI-8102 on another system) controller

    4 PXI-7340 axes into the Groove 4, no physical connection for this test

    (PXI-6221 in slot 2, not used in this sample program)

    Windows 7 Enterprise SP1 32-bit English

    LabVIEW 2011 SP1 32-bit English

    OR-Motion 8.3

    2.6.2 PXI platform services

    (all software OR additional distribution 2012 DS1)

    Controller BIOS: improved 1.3.1 to 2.0.1f0, problem given the two versions of the BIOS

    I'll try to post here as soon as we receive news of NEITHER.

    Kind regards

    Vincent

    Hi all

    I wanted to let you know that the driver OR Motion 8.4 coming should solve this problem.

    Best regards

  • Get a NAMED check constraint when the entity attribute derived from the field

    I'm designing a new database and beginning with a logic model of the ER. I've defined several areas, such as the NO_YES field (with values of ' no and 'Y'). When I use this area as a data type of an attribute of the entity (for example, the CHANGE_REQUEST.IS_APPROVED attribute), I also specify a constraint name (for example, CR_APPROVED_CK) of the attribute (this is done in the Group of constraint, property name constraint and the properties of the attribute dialog box, default value).

    When I have the logic model to a relational model of the engineer, the constraint name is lost. Specifically, for the definition of the table that is created, for the column in question, in the default column properties and constraints Panel dialog box, the name of constraint property is empty. When I generated the DDL of the relational model, the check constraint that is generated is an inline check constraint (such as ' IS_APPROVED VARCHAR2 (1) CHECK (IS_APPROVED IN ('n', 'Y')) '). When this DDL is executed to generate database objects, the created check constraint has a system-generated name. I want the constraint to have a name that I create.

    By experimentation, I found that in the relational model, if I specify a value for the property name of the constraint in the DOF resulting constraint get named (an ALTER TABLE statement is generated that contains "ADD CONSTRAINT CR_APPROVED_CK CHECK (IS_APPROVED IN ('n', 'Y'))"). However, I have redundantly change the relational model in the same way that I edited the logic model to specify the constraint names.

    Is there a way to guarantee that the constraint names defined in a logic model transferred during the engineering of a logic model to a physical model.

    The version of the Data Modeler I use is 3.0.0.665.

    Is there a way to guarantee that the constraint names defined in a logic model transferred during the engineering of a logic model to a physical model.

    There is ' compare/copy options' tab in the technical dialogue - clear the checkbox "do not apply to new objects.

    Philippe

  • Change the column total sub

    Hello


    I do sub total total on some columns but my requirement, it is I want to change the subtotal to my name is required and the total general at my name is required. Is this possible?

    Click the sigma (total application) > Format labels... give your name here...

  • 'CREATE JAVA' error: ORA-29506: derived from the USING clause invalid query

    Hello

    I created a table with the following attributes:

    name varchar2 (200);
    LOB_DATA blob


    I loaded a java source file in the lob_data blob.

    I then called the SQL:

    create or replace and compile the java source named "RemoteCommand" using blob
    Select lob_data from str_blob_table where name = 'RemoteCommand.java ';

    and I get the error:

    ORA-29506: invalid query from the USING clause
    ORA-00936: lack of expression
    29506 00000 - "query invalid derived from USING clause.
    * Cause: The USING clause does not form a valid query.
    * Action: Correct the USING clause.



    If I simply copy and paste the query part of the USING clause:

    Select lob_data from str_blob_table where name = 'RemoteCommand.java ';

    I get a valid result in SQLDeveloper.


    Any thoughts on what is happening here?

    A few notes:
    1. it is a 8i database.
    2. it works very well on a 9i database, but according to the SQL reference for 8i, it should work as well.

    Thank you
    Brent

    Try to delete "select" in the USING clause, that is to say change the SELECT BLOB SUPPORT... for BLOB to HELP... The original form of the syntax of JAVA to CREATE did not expect the SELECT token must be explicitly provided. Somewhere between 8i and 9i the parser was changed to try the provided text as well as what, with SELECT prefixed. So a CREATE JAVA statement you tried working in 9i but in 8i fails because SELECT would always be added before you try using the clause as a query, resulting a SELECT duplicate token.

  • Navigation from the column data

    JDev ADF BC 11.1.1.5.0

    Is it possible to provide a navigation of the column?
    For example, I have a column named "Accounts" to my table and there a few records. Each record should appear as a hyperlink that will lead me to a page where I can see the account information in detail.

    Suppose you already have an af:table with the data in it. Change the af: inputText / af:outputText for an af:commandLink account number - you can do it in source view (you will need to remove all properties that are not valid for af:commandLink). Set the Action property to point to a rule of control flow that takes you to the detail page. (If you were on 11.1.2.x, you must apply the hotfix that Frank details in the first part of the post that I linked you - this hotfix verifies that by clicking on the order link allows the current record).

    It is literally all you should have to do.

  • Derived from the existing columns

    Hello

    How to create a new column that has derive data from another table on this logic:

    Table A
    Name identity
    1 dsf
    2 homeless
    3 SDS

    Table B
    ID name tableA_ID
    1 dd 1
    2 of 2


    I added another column in table A in desperation to denormalize our data and didn't need to make a join to table B
    ID name tableB_name
    1 SD dsf
    2 sdf of
    3 SDS

    basically just try to merge 2 tables with a 1-1 relationship. I tried to fill in the data of table B in A, but by making an inner join and when I query the data, does not return a row ID 3 in table a.

    In model MDB make outer join. Make sure that you select next outdoor table.

    Score pls correct/good

  • Added the column total count.

    Hello
    I face 9.2.0.8, certain restrictions may apply :).

    This is the case
    SQL> create table t (id number) ;
    
    Table created.
    
    SQL> insert into t values(1);
    
    1 row created.
    
    SQL> insert into t values(1);
    
    1 row created.
    
    SQL> insert into t values(1);
    
    1 row created.
    
    SQL> insert into t values(2);
    
    1 row created.
    
    SQL> commit;
    
    Commit complete.
    
    SQL> select * from t;
    
            ID
    ----------
             1
             1
             1
             2
    
    
    
    SQL> select count(*), id , ratio_to_report(count(*)) over () *100 pct , count(*) over ()  from t group by id;
    
      COUNT(*)         ID        PCT COUNT(*)OVER()
    ---------- ---------- ---------- --------------
             3          1         75              2
             1          2         25              2
    
    
    but I need last column as all rows in table so should be
    
    SQL> select count(*), id , ratio_to_report(count(*)) over () *100 pct , count(*) over ()  from t group by id;
    
      COUNT(*)         ID        PCT COUNT(*)OVER()
    ---------- ---------- ---------- --------------
             3          1         75              4
             1          2         25              4
    
    how to rewrite that, ratio_to_report gives percentage which is quite good but need all rows .
    Concerning
    GregG

    Hello
    Do you need this?

    select count(*)
          ,id
          ,ratio_to_report(count(*)) over () *100   as pct
          ,sum(count(*)) over()
      from t
     group by id;
    
  • transform data from the column online

    Dear Member,
    I use 10G DB.
    Old table has the structure folliowng with values in point 1 or 2 or 3, 4, all columns
    ID      Year05      year06      year07      year08      year09      year10
    --     -------     -------     ------     -------     -------     -------
    1     654     387     3874     
    2          3645          878          899
    3     232     787          654     89     
    4               34
    ....
    
    The new table  has the following structure ( SEQ,id, year, amount). How can I insert the old data into the new structure like the following?
    
    SEQ     ID     YEAR     AMOUNT
    1     1     05     654
    2     1     06     387
    3     1     07     3874
    4     2     06     3645
    5     2     08     878
    6     2     10     899
    7     3     05     232
    8     3     06     787     
    9     3     08     654
    10     3     09     89
    11     3     10     899
    12     4     07     34
    WAN

    Hi, wAN,

    wanwan63 wrote:
    Frank,

    Thank you very much for the link.
    On the example Comm displayed always on the line if there is no value. Is it possible to not display COMM if comm is null?

    He finds that sal is never NULL in this example. If sal could be null, you want to exclude the rows of the result set, too?

    Add a WHERE clause to exclude the lines. We cannot use a column alias like num_val in the WHERE clause of the query even where it has been defined, then either
    (a) repeat the CASE expression in the WHERE clause, or
    (b) set num_val in a subquery and then use it in the WHERE clause of a query Super, like this:

    WITH     all_col_names          AS
    (
         SELECT     'COMM'  AS col_name     FROM dual     UNION ALL
         SELECT     'SAL'                   FROM dual
    )
    ,     got_num_val          AS
    (
         SELECT       e.ename
         ,       n.col_name
         ,       CASE     n.col_name
                      WHEN  'COMM'     THEN  e.comm
                     WHEN  'SAL'     THEN  e.sal
                  END          AS num_val
            FROM           scott.emp          e
         CROSS JOIN    all_col_names     n
         WHERE       deptno          = 30
    )
    SELECT       *
    FROM       got_num_val
    WHERE       num_val     IS NOT NULL
    ORDER BY  ename
    ,            col_name
    ;
    
  • copy the data from the columns box

    Hi all, I have multicolumn listbox and I deleted all the lines both vertical and horizontal lines and columns headers.when while, I run my vi, some string data are introduced into the list box. However when I try to copy a line of string in the drop-down list, I am unable to do (I can't select a line,... the idea is to select a row in the list box so that I can paste it somewhere else... That's how am supposed to allow some feature of the list box to be able to do this... any help? Thanks already

    Hello

    If I understand your problem, you want to copy the values of time and the description at once and paste the entire line in a txt for example, no? Unfortunately, the listbox is as an array of 2D channels and each field is a different value of this table 2D. You can copy a value at the time when the VI does not RUN otherwise you can use a property node to display the name of items and that the copy and paste values (always a time value) also using the VI.

    I hope the information is useful for your application

    Concerning

    Mario

  • Deriving from the country, state/province telephone number Codes

    Is it a practice of good (or bad)?  I want to program a step that derivative of country codes and state/province based on the initial number in the phone field (in our washer contact)?

    For example, if the phone number begins by + 091 (or 91, + 91) the country code must be IN; + 094 would be Sri Lanka.  We would run this step in the case where the perspective between our system with a address freemail (gmail, yahoo, etc.) and a phone number, but nothing else

    Countries might not be bad, but nothing else, and you might not get what you are looking for.  For example, I have 4 numbers on my 'family' of cell phone plan.  I have a number of Texas, my wife a number of Illinois, and one of my other lines is a number of Utah.  With the ease of portability of numbers from carrier to carrier and the appearance of everyone having unlimited long distance (at least here in the United States) no matter if you have a local number, or more.  I haven't lived in Utah in 6 or 7 years, but if I got an email that applied only to Salt Lake City it might not be the best experience.  I was in Illinois for a year and a half and do not rely on the number of Texas (my first) to landing any time soon.

    My 2 cents.

  • How to make a reference to a column from the column in a table other source

    Hello

    I have a tabular presentation (created using Wizard), in which a selection list, and the values in this list depends on another column in the form of tables.

    I tried 'Selection list (query based lov)' and mentioned the other column using #COL_NAME # and directly by COL_NAME, but nothing works.

    also tried using the dynamic query 'return "my query" ' but it does not work also.

    If someone has worked on a scenario like this, thanks for posting the solution.

    I get this error when I tried to the foregoing:
    report error:
    ORA-20001: Error fetching column value: ORA-06550: line 1, column 56:
    PL/SQL: ORA-01744: inappropriate INTO
    ORA-06550: line 1, column 13:
    PL/SQL: SQL Statement ignored
    Apex 4.1
    Oracle 11 g 2

    Kind regards
    Tauceef

    Published by: Tauceef on 5 December 2012 10:42

    See + {: identifier of the thread = 2250770} +.

  • How are derived from the random bits for new AESKey()?

    I was not able to find any documentation on how the random key is generated. There has been discussions on various security forums recently on the use of random number generators nickname (PRNG).

    I would like confirmation that the random bits for new AESKey() come from cryptographically safe pounds (like net.rim.device.api.crypto.RandomSource?).

    Random data used in the constructor of AESKey() comes from net.rim.device.api.crypto.RandomSource.

Maybe you are looking for