Calculation on two columns in the pivot table
Hi allI have a vision:
Dept. year amount
Accounting 500 $2010
Accounting 700 $2011
$100 engineering 2010
$600 engineering 2011
and etc.
PivotTable: (data displayed side by side)
Dept: 2010 2011
Accounting 500 $700 $
Engineering 100-$600
Is there a way of PivotTable to create the additional column, and do the math on this column? New column called 'Change' (amount of real computation of 2010 less amount of 2011 by each Department). I see the function to duplicate columns in the PivotTable. But that's it... without additional calculations.
Thank you in advance,
Sonya
Pretty easy simple n...
Your year must be in the columns area... Simply create a new collar calculated say diff with function as formula and formula of the sale as a "2011" "- 2010". This will give you the sum of diff. You can do this more flexible by making use of $1 & $2 to reference...
Tags: Business Intelligence
Similar Questions
-
Prevention of Mult. Select all THE values column of the pivot table
All,
Is there a way to prevent the behavior when viewing a PivotTable and using a Mult. Select guest, choosing mult. values and each pivot has all THE column values for all THE pivots on the screen?
For example, lets say we had the following in the pivot:
Column: STATE
Line: PRODUCT
and we had a Mult. Select a prompt on the REGION - East, West, Central, West
If I've chosen is in the prompt, I get all the States of the REGION of the East for the first values.
If I choose the East and the West in the prompt, I get a pivot showing amounts East and Southeastern States in the Western States AND top (no value, of course) at the top. I also have an another pivot below showing the amounts of the West and Western States, AND the Northeastern States (no values for the Eastern States).
In other words, all States that are in the mult. REGION show selected in each pivot.
Thank you.Uh, that's what I said...
-
Sorting of rows and columns in the pivot table
My XML:
With the help of the wizard, I created the corss-tab (table 2 x 2)<ROWSET> <data> <R>C</R> <C>3</C> <V>C3</V> </data> <data> <R>C</R> <C>2</C> <V>C2</V> </data> <data> <R>B</R> <C>1</C> <V>B1</V> </data> <data> <R>B</R> <C>3</C> <V>B3</V> </data> <data> <R>A</R> <C>2</C> <V>A2</V> </data> <data> <R>A</R> <C>3</C> <V>A3</V> </data> </ROWSET>
produce the following output:(1,1) RC (1,2) <?for-each-group@column:data;./C?> <?C?> <?end for-each-group?> (2,1) <?for-each-group:data;./R?><?variable@incontext:G1;current-group()?><?R?> (2,2) <?for-each-group@cell://data;./C?><? ($G1[(./C=current()/C)]/V)?> <?end for-each-group?>group?>
I need the same exit, just with the rows/columns properly ordained. Help, please. Thank you.------------------------- RC 3 2 1 ------------------------- C C3 C2 ------------------------- B B3 B1 ------------------------- A A3 A2 -------------------------
Hello
with this code
Cell (1,2): <? for-each-group@column:data;. / C ? > <? type: C? > <? C? > <? end for each group -? >
Cell (2,1): <? for-each-group: data; / R ? > <? type: R? > <? variable@InContext:G1;current-group()? > <? R? >
Cell (2.2): <? for each group-@cell://data;. / C ? > <? type: C? > <? ($G1_SQUAREBRACKET_(./C=current()/C)]/V)? > <? end for each group -? >and get your data
.....|.. 1..|... 2...|... 3
A.............. A2... A3
B...... B1............... B3
C............... C2... C3Concerning
Rainer -
ViewCriteria comparing two columns of the table to create
Anyone know how I can create a ViewCriteria where clause that compares the two columns of the same table?
For example if I had two columns of integers (MINSAL and MAXSAL) and wanted to see if they are equal. Normally, I would do the following SQL below.
SELECT * EMPL
WHERE MINSAL = MAXSALTry to link any of them to an expression of groovy.
Timo
-
SQL query * I want to insert a file column in the other table based on two columns
I want to insert a column records to another table based on two columns
the query below does not work
insert into def_ver_lnki_p (job_name)
Select def_job.job_name
from def_job where def_job.job_id = def_ver_lnki_p.job_id and def_job.table_id = def_ver_lnki_p.table_id;
Just to correct sql
Update
def_ver_lnki_p define job_name =)
Select def_job.job_name
of def_job
where def_job.job_id = def_ver_lnki_p.job_id
(and def_job.table_id = def_ver_lnki_p.table_id);
-
Comparison of columns in the same Table, with the exception
Hi all
I need compare two values of column in the same table. But should ignore a few characters like space, comma, point
Following should be consistent
How is it possible'ABcd f' = 'AbCDf' 'xyz ..' = 'xy z'
See you soon
Sexywith t as ( select 'ABcd f' col1,'AbCDf' col2 from dual union all select 'xyz ..','xy z' from dual union all select 'xyz ..x','xy z' from dual ) select * from t where upper(translate(col1,'a ,.','a')) = upper(translate(col2,'a ,.','a')); COL1 COL2 ------- ----- ABcd f AbCDf xyz .. xy z
Published by: JAC on 4 February 2013 17:22
-
Compare two rows in the same table
Hi all
I need to compare two rows in the same table, I don't know hoe to do it in pl/sql. Please help me on this.
example:
price of ro TR
xya0001 AMA.7 12
xya0003 ama6 14
xya0004 AMA.7 16
in table b is a unique value for each line, I need to compare the price column and see if the first value is less than or greater than the following value and, if there is more to put the corresponding value of br to a variable, and if it is less, put the corresponding value of the br to another variable. I don't know a method to do this, as I'm new to pl/sql. Please help me in thisfor data in(select tr,br,price, lag(price) over ( order by tr) newcol from yourtable) loop if nvl(data.newcol,0) > data.price then variable1:=data.br; else varable2:=data.br; end if; end loop;
-
calculate the sum of the two columns - display the result in the third column
Hello
I have a report and I want to calculate the sum of the two columns of the report and display the total in the third column.
For example: Sample_My_Report
Col1 Col2 (Col1 and Col2) Total
3-7-10
can someone help me with this question.
Thank you.Hello:
If your report is an IR you can use the menu "Tool" to add columns calculated at the State
CITY
-
Mr President
If I have the two LOV in the same table then how to connect when I select first and second LOV value also change?
My two fields are FLOW AND DR_NAME
FLOW = ACCT_ID
DR_NAME = ACCT_NAME
I created with success of LOV for these fields.
First LOV gives acct_id in the debit field and second LOV gives the value of acct_name to dr_name.
How can I report these lov, it's that when I change my acct_id then acct_name also change
I have these two tables
CREATE TABLE "NOM" ( "ACCT_ID" VARCHAR2(7) NOT NULL ENABLE, "ACCT_NAME" VARCHAR2(50) NOT NULL ENABLE, "O_BAL" NUMBER(13,2), CONSTRAINT NOM_PK PRIMARY KEY ("ACCT_ID")ENABLE ); CREATE TABLE "VOUCHERDET" ( "V_ID" VARCHAR2(9) NOT NULL ENABLE, "LINEITEM" NUMBER , "DEBIT" VARCHAR2(7) , "DR_NAME" VARCHAR2(50), "CREDIT" VARCHAR2(7) , "CR_NAME" VARCHAR2(50), "PARTICULARS" VARCHAR2(100), "AMOUNT" NUMBER(21,2), CONSTRAINT VOUCHERDET_PK PRIMARY KEY ("V_ID","LINEITEM")ENABLE, CONSTRAINT PUR_SAL_LINE_POD_FK FOREIGN KEY(PROD_ID) REFERENCES PRODUCTS (PROD_ID)ENABLE, CONSTRAINT VOUCHERDET_DEBIT_FK FOREIGN KEY ("DEBIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_CREDIT_FK FOREIGN KEY ("CREDIT") REFERENCES "NOM" ("ACCT_ID") ENABLE, CONSTRAINT VOUCHERDET_V_FK FOREIGN KEY ("V_ID") REFERENCES "VOUCHER" ("V_ID") ON DELETE CASCADE ENABLE );
Concerning
so, instead of this second ActId, choose ACCT_NAME:
-
Make a column based on another value of the column in the same table
JDev 11.1.1.6.0
It may be a silly question but I'm stuck
I need to conditionally return a column that said Condition is as if the value in the other column of the same table B is equal to F. I should make A column only when this condition is met. I tried the following code:
< af:column sortProperty = "PhoneNumber1." sortable = "false". headerText = "#{bindings." A.hints.PhoneNumber1.label}. ID = "c146. rendering = "#{rank." PhoneNumber1ResponseFlag eq 'F'} ">" < af:outputText value = "#{rank." PhoneNumber1}. ID = "ot130" / > < / af:column > < af:column sortProperty = "PhoneNumber1ResponseFlag." sortable = "false". headerText = "#{bindings." B.hints.PhoneNumber1ResponseFlag.label}. ID = "c80" rendered = "true" > < af:outputText value = "#{rank." PhoneNumber1ResponseFlag}. ID = "ot129" / > < / af:column > The data presented in the table for the PhoneNumber1ResponseFlag column are F. Still my condition does not work.
Well, I've finally sorted it myself by managed bean.
Here are the steps I followed:
- Wrote a new bean managed.
- Added a Boolean variable called flag and made to true when the "'PhoneNumber1ResponseFlag ' current line attribute is equal to F."
- Changing the property made column on this indicator.
-
Question: Is foreign key references to a different column in the same table
Hello
I'm not grasp this concept. Would you be able to provide the logic how and why you need to create a foreign key that references a column of the same table?
For example, referencing the schema, SupervisorNo @ here is a FOREIGN KEY to the "EmpNo" column in the same table.
EMPLOYEE (EmpNo, title, Fname, Lname, phone, Email, date of birth, sex, salary, HireDate, OutNo, SupervisorNo @)
Why would you want to do this and how can it be used? If you are filling out the data in the table, and this constraint is enabled, you will not be able to load whatever it is because the "EmpNo" column will be empty.
Any input you can provide me with this would be greatly appreciated. Thank you!
His name
Self-referential integrity constraints
Lets say that we have the table emp with emp_no and mgr_no columns.
Now all managers should also be an employee too. How can I check this when inserting data into this table? I applied auto integrity constraint. It would help me to make sure no handler (doesn't mean no mgr_no) must be registered if this Manager is not an employee of this organization. Which means, I won't be able to enter any mgr_no in the column until and unless that the same employee also is an employee (emp_no from the same table).
Check the link as well below.
Thank you
Ishan
-
support_db not here column in the fnd_nodes table
Hellotoday I have clone of 11.5.9 instance and face under question.
Update s_tnsmode to 'generateTNS '.
UpdateContext came out with status: 0
AC-50480: internal error: java.lang.Exception: error during the generation of the l
istener.ora.
Error generation tnsnames.ora database, temperory tnsnames.ora will be
generated using models
Instantiating tools tnsnames.ora
Tools tnsnames.ora instantiated
Tnsnames.ora Web instantiatedadgentns.pl out with status 2
CODE OF ERROR = 2 ERRORCODE_END
.end std out.but as per below, I solved the problem
Sqlplus apps...
SQL > EXEC FND_CONC_CLONE. SETUP_CLEAN;
COMMIT;
EXIT;Run AutoConfig on all levels, first on the DB layers, and then the APPS, to recharge the necessary system tables.
But I noticed it is not support_db of the column in the fnd_nodes table, is this a normal behavior in 11.5.9?
Please share your ideas
Thank you
Shaik
Shaik,
Yes, it's normal.
This article was introduced in 11i. FND. H (11.5.10 and above).
Thank you
Hussein
-
Can we have hash partition and list on 2 columns in the same table. How.
Can we have hash partition and list on 2 columns in the same table. How.
Work on 10g release 2# List-Hash is a valid composite partitioning strategy 11 from g.
-
Update the same column in the same table
Hello
How do update you a records of column in the same table?
I have purchase_order of the table. Consists of column ID, color, Purchase_No, Sub purchase.
< pre >
Create table Purchase_Order)
Identification number,
color varchar2 (10),
purchase_No varchar2 (5).
purchase_sub varchar2 (2));
< / pre >
< pre >
ID color Purchase_No purchase Sub
6416 S1406 PURPLE 3
6415 S1406 GREEN 2
6414 S1406 GREEN 1
6419 S1406 3
6417 S1406 1
6418 S1406 2
< pre >
6 unique ID records is in the same site. But 2 ID will be confined to a purchase_sub.
For example
6416,6419 purchase_no S1406 but has the same purchase_sub who need 3.I 6419 color "Purple".
Expected results:
< pre >
ID color Purchase_No purchase Sub
6416 S1406 PURPLE 3
6415 S1406 GREEN 2
6414 S1406 GREEN 1
6419 S1406 PURPLE 3
6417 S1406 GREEN 1
6418 S1406 GREEN 2
< / pre >
Thank you!
Published by: CrackerJack on May 4, 2009 15:04Hello
Try this,
UPDATE Purchase_Order a SET a.Colour = (SELECT colour FROM Purchase_Order b WHERE a.Purchase_Sub = b.Purchase_Sub AND b.colour Is Not Null) WHERE a.Colour Is Null
Kind regards
Christian Balz -
Calculate the % with the pivot table columns
I created an application with these columns:
I want to create a pivot table looks like this.Metric Study Fast Slow On-Target Total --------------------------------------------------------------------------------- Metric1 Study1 1 0 0 1 Metric1 Study2 1 0 0 1 Metric1 Study3 0 0 1 1 Metric1 Study4 0 0 1 1 Metric1 Study5 0 1 0 1 Metric1 Study6 0 1 0 1 Metric1 Study7 0 0 1 1 Metric1 Study8 0 0 1 1 Metric1 Study9 1 0 0 1 Metric1 Study10 1 0 0 1
The fast, slow, on the target and Total columns are calculated fields. Picky, I'm having is to get the % columns to work. I also tried create columns % in the form of columns of the table, but at each level of study, the % is 100% or 0%.Metric Fast Slow On-Target Total % Fast % Slow % On Target ------------------------------------------------------------------------------------------------------ Metric1 4 2 4 10 40 20 40
I tried with duplicate columns, all different options to display the value as. None of them worked.
Could someone help me? The version of the OBI is 10.1.3.4
Thank you
Shi-ning
Published by: SPUD on November 21, 2011 23:09Sounds like it. You will need the account of studies as a measure in the criteria. You could do something in the repository, but the fastest way is:
Criteria:
Add the study in (it will not go into the PivotTable)
create new measure based on any existing measure that has the background you need with the formula:
cases where [existing] is not null then 1 else 0 endThis will give you 1 for each line that your measure in effect is valid. Add this new measure in the PivotTable and treat it as a normal amount.
Maybe you are looking for
-
HP pavilion g6-1360ex: hp pavilion BCM20702AO g6-1360ex device driver
HP pavilion 1360ex g6 driver device BCM20702AO & SM Bus controller drivers can someone please Machine = HP Pavilion G6-1360ex OS = Windows 7 Ultimate 64 bit Product number: [personal information deleted] The device name = BCM20702A0 Hardware ID: USB\
-
Photosmart 7510: HP 7510 abruptly stopped printing and now think all inks are running low
Printer worked very well. I went to Staples and wanted to buy a black ink cartridge. Open printer to check what number I needed. Found it was 564. Just before leaving for the store, I opened the printer to make sure I had the right number. Close
-
Window Update icon is missing in Windows 7
The windows update icon does not appear in my system tray even though it has listed updates that have not yet been installed. The icon was there for August update patches. I usually do not install the patches each month all at once, but I install th
-
HP pavilion p-077tx: HP support assistant missing
I've updated my laptop for windows 10 since then hp support assistant has disappeared. I need to driver updates please help
-
Cannot create agents on the DB Instance in Foglight 5.6.4
Hello We use Foglight 5.6.4 Infra-monitoring. We monitor Web, App and DB servers using the tool for different applications. In the Assistant database discovery database dashboard, we find all the instances running on a particular host of DB. We are a