Division between two columns in pivot table in Answers
Hi all
In answers
if I have two columns in my pivot table say column A and Column B, how can I use a division of Column B by Column A to derive Column C. I am unable to do that using the "New Calculated column feature" or in the criteria section. I keep getting either 0 or 1. I even tried changing the format to show two decimal places and am still unable to get the result.
Thanks
B
Thanks,
our issue is that we want to do our calculations at the summary level (region level of the company) and not at the detail level. However we cannot do this at the aggregate level because this is a moving total for the last 7 days worth of data.
Also, Answers (even in Criteria) does not seem to be doing division properly. We are just not getting the results when we do col A/ Col C. We are in 10.1.3.4 on windows xp against SQL Server
Any ideas?
Edited by: Mid Atlantic on Jul 22, 2011 5:33 AM
Similar Messages
-
Calculation on two columns in pivot table
Hello all,
I have a view:
Dept Year Amount
Accounting $500 2010
Accounting $700 2011
Engineering $100 2010
Engineering $600 2011
and etc
pivot table:(data displayed side by side)
Dept: 2010 2011
Accounting $500 $700
Engineering $100 $600
Is there a way in pivot table to create additional column and do a calculation on that column? New column called 'Change' (actual calculation amount of 2010 minus amount of 2011 per each department). I see the feature which allows to duplicate the columns in pivot table. But this is it... no additional calculations.
Thank you in advance,
SonyaDeepak,
My "YEAR_NO' is already in the column area. Once I created 'calculated column' and entered formula '2011'-'2010' I got what I needed.
Thank you very much for the solution.
Sonya
In my view I also have column called EXPENSE. When, I added the 'calculated column' to 'YEAR_NO' with formula '2011'-'2010'. It created two calculated columns 1) after the EXPENSES and the other one after YEAR_NO. Is there a way to be specify to display the DIFFERENCE only once after the YEAR_NO??
Edited by: user8461308 on Dec 20, 2011 7:44 AM -
Division of two columns in pivot table_OBIEE
Hi,
Can you please let me know if there is a way to divide 2 fact columns in pivot table in OBIEE?
Consider a pivot table like this
Year No of customers purchase volume No of customers/purchase volume
1983 30 17000
1985 23 8900
1986 42 21000
I need to calculate No of customers/purchase volume
I did this calculation in criteria and the results are fine but when i tried to bring this to pivot i have no luck.I tried all aggregation rules like sum,average,server complex aggregation but no luck.Is there any option to calculate this column in pivot section?
Note: 'Year' is in row section and other columns are measures in pivot.
Thanks,
KalaiThanks,
our issue is that we want to do our calculations at the summary level (region level of the company) and not at the detail level. However we cannot do this at the aggregate level because this is a moving total for the last 7 days worth of data.
Also, Answers (even in Criteria) does not seem to be doing division properly. We are just not getting the results when we do col A/ Col C. We are in 10.1.3.4 on windows xp against SQL Server
Any ideas?
Edited by: Mid Atlantic on Jul 22, 2011 5:33 AM -
How to get the difference between two columns in a column group
Hi All,
My first time here and really new to programming. I would like to get the difference between 2 columns that are inside
a column group.
Here is my sample table below: The Column Group is PeriodNumber and can only choose 2. like 1 and 2.. I would like to have a third row which will simply calculate the difference between the amounts in PeriodNumber 1 and 2.
PeriodNumber
Account 1 2
1) Cash 10,000 15,000
2) Receivables 12,000 11,500
3) Equipment 5,000 5,500
Total Assets 27,000 32,000Hi yabgestopa,
From your description, you want to get the difference between two columns in a column group. After testing it in my environment, we can use custom code to achieve your requirement. For more details, you can refer to the following steps:
Copy the custom code below and paste it to your report. (Right-click report>Report Properties>Code)
Dim Shared Num1 As Integer
Dim shared Num2 As Integer
Public Function GetAmount(Amount as Integer, Type as String)
If Type = "1" Then
Num1=Amount
Else
Num2=Amount
End If
Return Amount
End Function
Public Function GetDif()
Return Num1-Num2
End function
Right-click the second column to insert a third column with Outside Group-Right.
Then use the expressions below in the matrix.
=Code.GetAmount(Fields!Amount.Value,Fields!PeriodNumber.Value)
=code.GetAmount(Sum(Fields!Amount.Value),Fields!PeriodNumber.Value)
=Code.GetDif()
The report looks like below.
If you have any questions, please feel free to ask.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Find the difference between two columns in an ssrs matrix ? MSCRM
Hi All,
I am working in reporting part of our project (On-line MSCRM 2013) & in reporting services.
I am trying to create report using fetch xml based. Below is the snap what we required the result.
Kindly help me, how to get the difference in both column. (Its a matrix table where year is grouped).
We need difference between both year Like (Plan Revenue of 2013 & Plan Revenue of 2014 difference in Plan Revenue Diff section) and same for Actual
Revenue.
https://social.microsoft.com/Forums/en-US/054d5ca4-0d38-4dc6-84a8-88866cc228fe/find-the-difference-between-two-columns-in-an-ssrs-matrix-mscrm?forum=crmdevelopment
Thanks,
Mohammad ShariqueHi Bro,
I used parametrized option for year and done the report,Currently we are getting values in Difference column now i want to show
that value in percentage. How can we show the percentage based on that value. Means i want to show the Difference in Percentage.
Kindly help me i tried but getting some issue. Below i am mentioning the code and snap with result.
Below expression using to showing Plan Revenue in Percentage for year.
=
Sum(IIF(Fields!new_year.Value =Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
- Sum(IIF(Fields!new_year.Value =Parameters!EndYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))
/IIF(Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0)))>0,
(Sum(IIF(Fields!new_year.Value = Parameters!StartYear.Value,cdec(Fields!new_planrevenueValue.Value/1000), cdec(0))))
,1)
)*100))
Result issue is as below in snap with highlighted in red colour.
Kindly help me on this issue also :) -
How to extend No. of columns for PIVOT table in BI Publisher Desktop
Hello Everyone,
I am using the Oracle BI Publisher Desktop to design the TEMPLATE for Oracle Reports.
I need to create the PIVOT table .In my PIVOT table I need to display 9 columns but when I tried to create PIVOT table by dragging 9 columns only first 4 columns are displaying in report.
Can anyone suggest me how can I increase the number of columns in PIVOT table?
Thank You.
Regards,
Guru.hi jim
if you carefully look inside the form field's you will find the logic of sort . if you remove that you will get the data without any sorting order.
else send me your template and xml to my email id i can look into that .
email : [email protected] -
How can we modify the maximum no. of columns in pivot table ?
hi all,
How can we modify the maximum no. of columns in pivot table ?
do i need to change the nqconfig.ini or instanceconfig file or else?
thnx..A little search on the forum :
In the instanceconfig.xml add a <PivotView> element under <ServerInstance> if one does
not exist already.
Within the <PivotView> element add an entry that looks like:
<MaxCells>nnnnnn</MaxCells>
where nnnnnn is your desired limit for the maximum total number of cells allowed
in a pivot.
Warning: an excessively large number will cause more memory consumption and
slower browser performance.The details here :
Oracle BI EE (10.1.3.2): Maximum total number of cells in Pivot Table excee -
Need to compare values in two columns of one table against values in two columns in another table
Hi, as the title reads, I'm looking for an approach that will allow me to compare values in two columns of one table against values in two columns in another table.
Say, for instance, here are my tables:
Table1:
Server,Login
ABCDEF,JOHN
ABCDEF,JANE
FEDCBA,SEAN
FEDCBA,SHAWN
Table2:
Server,Login
ABCDEF,JOHN
ABCDEF,JANE
FEDCBA,SHAWN
In comparing the two tables, I'd like my query to report the rows in table1 NOT found in table2. In this case, it'll be the 3rd row of table one:
Server,Login
FEDCBA,SEAN
Thanks.create table Table1([Server] varchar(50), Login varchar(50))
Insert into Table1 values ('ABCDEF','JOHN'),('ABCDEF','JANE'),('FEDCBA','SEAN'),('FEDCBA','SHAWN')
create table Table2([Server] varchar(50), Login varchar(50))
Insert into Table2 values ('ABCDEF','JOHN'),('ABCDEF','JANE'), ('FEDCBA','SHAWN')
select [Server] ,Login from Table1
Except
select [Server] ,Login from Table2
select [Server] ,Login from Table1 t1
where not exists(Select 1 from Table2 where t1.[Server] = t1.[Server] AND Login=t1.Login)
drop table Table1,Table2 -
Calculated Percentage Columns in Pivot Table loose formating in Excel
I have a simple report built using pivot table ( OBIEE 11.1.1.5.0)
1 Metric and 1 dimension using pivot table. and I duplicated the metric column and change it to % column.(Show data as % of column). SO far so good. Below is the snapshot
http://tinypic.com/r/2s14xa9/7
Now i download the report in excel and all the % values are messed up . Below is how it looks
http://tinypic.com/r/bede90/7
I tried messing with data formats etc..nothing works.. I cannot add a custom column format to the metric column since it will impact the derived % column.
Is this a bug ?Any pointers ..
ThanksHi,
Follow up this SR:
SR 3-5060435331: Calculated Percentage Columns in Pivot Table loose formating in Excel
Workaround: (not sure may be give a try)
also give a try like below one then try to download it may work.
In that % column -->add the below statement in the Custom CSS section of the column properties:
mso-number-format:"\@"
Refer snapshot here:
http://i53.tinypic.com/a09kqv.jpg
This will treat the data in the column as text while downloading to excel, hence retaining any leading or trailing spaces.
Thanks
Deva -
How to find differences between two columns
Hello I need the formula to spot differences between two columns and to write on a third one if the same name appear on the two columns.
For example:
rome berlin true
berlin moscow false
chicago toronto true
toronto chicago true
florence
Thanks
LorenzoYou should be able to use COUNTIF where the range is th first column and the condition is the word in the second column. If the result is greater than zero then the word is in both columns.
-
I need to retrieve the a set of rows in between two rows from a table.
consider employees table and primary key employee_id.
With out using EMPLOYEE_ID column in the where clause or between clause, I need to get the records between 104 and 116 or a set of records between two rows.
Can any one help me in this... i know this is simple but am just a fresher to oracle development... help me grow....
Thanks,
Arunya at last i got the out put... thank guys for thinking with me....
SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id)
WHERE ROWNUM <=8
MINUS
SELECT rownum, employee_id FROM (SELECT rownum, employee_id FROM employees ORDER BY employee_id) WHERE ROWNUM <= 4 -
Suppressing Columns in Pivot table when adding subtotal
Hi,
We have a dimension hierarchy like this:
Level 1 ---> Level 2 ---> Level 3
T ---> A ----> B1
T ---> A ----> B2
T ---> C ----> D
T ---> E ----> E
The report we are trying to build is of this format:
Row_Num --> Dimension --> Amount
1 --> B1 ---> 100
2 --> B2 ---> 50
3 --> A ---> 150
4 --> D ---> 75
5 --> C ---> 75
6 --> E ---> 100
When using Pivot table and subtotals, we are getting the report as below: (where for Dimension Value "E" there are two rows)
Row_Num --> Dimension --> Amount
1 --> B1 ---> 100
2 --> B2 ---> 50
3 --> A Total ---> 150
4 --> D ---> 75
5 --> C Total ---> 75
6 --> E ---> 100
7 --> E Total ---> 100
We do not want the subtotals to be calculated if Level 2 and Level 3 are the same.
Any ideas on how to achieve this?
Many Thanks,
SeetharamHi user7276913,
Are you sure you are using a Pivot Table view? Or are you using the standard table view?
In a pivot table, you can only have (n-1) sub-totals where n is the number of fields in your "Rows" section. So in your case you have two fields, so you can only have 1 sub-total. See my screen shot below where I have a similar situation:
!http://i47.tinypic.com/icux5y.png!
Note that in the screen shot only the first column has a summation and the second does not. This makes sense since a sub-total and the last column would be the same as the values being displayed in the "measures" section.
What you described in your post seems more like what I'm seeing in a standard table view
!http://i48.tinypic.com/34z12zp.png!
Based upon what I'm seeing in your sample report, it seems like you are missing some kind of line item number or transaction number or some field that uniquely determines a row. If you add this field into the pivot table you will get exactly what you want.
e.g. Pivot Table Rows = Customer # (with summation Enabled) , Document Type (Summation Enable), Line Number
Good luck and if you found this post useful, please reward points!
Best regards,
-Joe -
Common Label for two columns in pivot view??
Hi Guys,
PLs help me..
i want common label or heading columns in pivot view..
Example:
Under label1 (i should have two columns like 'A','B'), under label2(shud have colums like 'C','D','E')..
i tried with dummy column, i placed it in measures section..but its not worked)..Hi Bhargav,
f you are using 11g, goto Pivot Table Properties->Display Column & Folder Headings option.
In 10g try this, http://obiee1000.blogspot.in/2012/03/header-on-measures.html
Regards,
Dpka -
Percentage of Total Count of Category in Raw Data Column in Pivot Table
I have normalized my data in Excel and I have a column: "question 1" and then a column for "gender" which has values as "female" and "male". I have created a pivot table for these two variables, "Gender" and
"Question 1". My values for Females and Males from the Gender data are presented within my pivot table. I want to present these numbers as percentages of Total "Females" and "Males" that are in the "Gender" column in
my master dataset. Pivot tables will only allow me to do %'s of data already in the pivot table
I am attempting to use Calculated Fields within Pivot Tables to resolve this. I do not want to create a separate column in my master data set, but rather, complete all calculations within the pivot tableThank you very much,
The steps you provided use the total "gender" within the pivot table as the "grand total".
If I have a binomial variable, "gender" with "male" as one of the variables, I need the grand total be the total male in the raw data.
Example: if there are 100 total males in the raw data for the column "gender"
and I construct a pivot table with a dependent variable which is a survey question and "gender" and 30 males "agreed" with the survey question and 20 females "agreed" with the survey question, your instructions for % of grand total would show 60% for
males who agree [males + females who replied to the survey question],
when, what I need is the total males in the raw data, 100, used as the total so that the percentage of males who answered "agreed" to the survey question is 30% of all males.
Thank you very much -
No data for Parent-child hierarchy column in Pivot table view
Hi all,
I used OBIEE 11.1.1.6.2 Version.
I drag one Parent-child hierarchy column and one measure and show result with a pivot table view.
But when I click "+" icon to show detail level data,
It messaged that: "*the layout of this view combined with the data,selections,drills,or prompt values chosen resulted in no data*."
But it can show every-level data when I used table view.
It was so strange..
Did anybody meet this before?
Thanks in advance.
regards,
AnneHi,
Yes, I have the same problem with pivot table for hierarchy dimension.
If you use a normal table (not pivot) it seem to work. Unfortunatley with restrictions as normal table view have.
Same problem still exist in 11.1.1.6.5
I have logged a SR to Oracle about this.
Maybe you are looking for
-
Please help me keep a program from booting on startup
Hello. When I restart my MacBook Pro, I get a message from PowerChute that I don't have a UPS hooked up (which is true). I want to prevent this message from appearing, and, in fact, remove the application entirely. But I can't seem to find it! I've s
-
Adding a down state to the spry menubar
Does anyone know of a easy way to add a down/click state to the menu items? I'm not too much of a javascript expert so from what I can tell it seems like I am limited to the current functionality of the script. Any suggestions?
-
I have an OracleXE database on Win2003. Works fine. I installed Apache 1.3. Works fine. I downloaded and installed the ZendCore for Oracle and when I try to access the admin console at http://<localhost>/ZendCore I get a 404 error. The httpd.conf has
-
Passing "sy.workitemurl" value to Service
Hi, I wanted to pass sy.workitemurl as a parameter to web service. i created a Callable object of type Business Object but i am not able to assign the value of sy.workitemurl to that parameter. it gives null value. NOTE: same thing in email template
-
Linking back to a query after action page
Wondering if anyone knows the best way to add a link on an action page that will take a user back to a completed query page. What I have is a query results page that allows to edit or delete, after the action of either edit or deleting I need to brin