Help wiht multi pivot table
Hi
I have searched pivotand not sure if what I see will work for me. here is what I have
table
ssn,benefit_id,plan_id, option_id
123456789,MEDICAL,BCBS,80/20
123456789,MEDICAL,ATENA,1020
I need a pivot table where i can put the ssn and then all benefit_id,plan_id, option_id combinations in the table into a pivot table sorfor above I have
123456789,MEDICAL,BCBS,80/20,MEDICAL,AETNA,1020,etc
I have this working
SELECT ssn,
LTRIM(MAX(SYS_CONNECT_BY_PATH(benefit_id,','))
KEEP (DENSE_RANK LAST ORDER BY curr),',') AS benefits
FROM (SELECT ssn,
benefit_id,
ROW_NUMBER() OVER (PARTITION BY ssn ORDER BY benefit_id) AS curr,
ROW_NUMBER() OVER (PARTITION BY ssn ORDER BY benefit_id) -1 AS prev
FROM emp_ben_elects)
GROUP BY ssn
CONNECT BY prev = PRIOR curr AND ssn = PRIOR ssn
START WITH curr = 1;
IN 9.i
How do I add the plan_id and option_id?
Any Ideas?
Hi,
If you use Rob's approach, change the second argument of SYS_CONNECT_BY_PATH to something that will not appear in the first argument.
That is, don't say:
SYS_CONNECT_BY_PATH ( benefit_id || ',' || plan_id || ',' || option_id
, ',' -- WRONG: Causes ORA-30004
)Instead, do something like:
SYS_CONNECT_BY_PATH ( benefit_id || ',' || plan_id || ',' || option_id
, ';' -- Assumes semicolon never appears in columns above
)If you really want to have the same character that separates fields (',' above) used to separate records, too (instead of ';', above) use REPLACE on the string returned by SYS_CONNECT_BY_PATH:
REPLACE ( SYS_CONNECT_BY_PATH ( benefit_id || ',' || plan_id || ',' || option_id
, ';' -- Assumes semicolon never appears in columns above
)I wouldn't use CONNECT BY at all. I suggest the user-defined STRAGG function, which you can copy from astom
After installing STRAGG, your entire query will just be
SELECT ssn
, STRAGG benefit_id || ',' || plan_id || ',' || option_id)
FROM emp_ben_elects
GROUP BY ssn;Unlike your original query, the records will not necessarily appear in any particular order.
If you want that, STRAGG can be used as an analytc function.
Similar Messages
-
Help me regarding pivot table group by
Hi ,
i am developing an bi publisher rtf template using ms word .
i had an issue with pivot table.
i have a table something like this
table_code Indicator1 year value
1 a 2008 20
1 a 2009 40
1 b 2008 10
2 a 2008 20
2 a 2008 20
2 a 2008 20
in table view i am doing this .. i am grouping my table by table_code
<>TABLE_CODE
INDICATOR1 YEAR VALUE
INDICATOR1 YEAR VALUE
By doing so , i am getting all the tables in my database
like
1
indicator year value
a 2008 20
a 2008 10
a 2009 20
2
indicator year value
a 2008 20
a 2009 20
b 2008 20
. so on
Now i want pivot table view like
1
Indicator 2008 2009 2010
a 20 30 40
b 10 40 40
2
Indicator 2008 2009 2010
a 20 30 40
b 10 40 40
how can this be achieved??
how to create a group by in pivot table? where to write the group by clause?
struck here from 1 week. any help will be appreciated .
Thank You,
Sunny.i have to use table_code also in the view??
C H ACCTABLE_CODE
INDICATOR1
G YEARE
G RSTABLE_CODE
G INDICATOR1
G 999.00E E
and where to write the code.outside the table or on which tag?? and what to write.
please help me.
Thanks -
Help in Pivot Table (or another ways)
I need to do following view in the report,can anyone tell me how can I do that??
This is original report:
DATE AMOUNT1 AMOUNT2 AMOUNT3
01/02/2009 5 6 7
02/02/2009 2 3 4
I want to change this view into this:
01/02/2009 02/02/2009
AMOUNT1 5 6
AMOUNT2 6 3
AMOUNT3 7 4
How can I do this? Please help me..Have a look here:
http://obiee101.blogspot.com/2008/05/obiee-pivot-table-measure-label.html
regards
John
http://obiee101.blogspot.com -
Help with pivot tables in excel
Hello,
I need some help with a very specific issue I am getting in excel.
So, I have this pivot table that gets data from an external source (a huge database) and everything is working fine.
The problem comes with some lines in our database that are written in asian letters (the thai alphabet). Every thai entry that we import appears like ????????.
I can look into the DB (via MySQL Workbench) and everything is alright in there. I can also just copy some of the content into excel and the letters shows up normally.
Is there something I can do to fix it?
Thank you very much
Daniel AyresI can see it is working fine for roman/latin characteres, and it is not working for thai or japanese characteres. Since I dont have data written using the russian or the arabic alphabet, there is no way I can tell you if it would or not work..
-
Pivot table HELP in OBIEE Answers!!!
Hello,
I am having some problems in a “pivot table”, “Sections” and “Calculated Items” I have a section called 'e) External Income' and I would like the value reverted from a negative to a positive. In excel or any other form of calculation you can do this by * -1 (negative 1). However this statement does not work as a Calculated Item. This is the statement I am using = 'e) External Income'*-1 and I get the following error message “The semantics of the formula entered are not valid”.
I have also tried = 'e) External Income'-('e) External Income'+'e) External Income') this will give you it as a minus also but I have no error message this time, but the values stay the same.
Can this be done any help would be very appreciative.
Thank you
JohnI cannot change the folmula in the critera tab because this will chnage my values on the other 'Bins' I have created. Ref your other question i have a list of account codes and i have grouped ones together to create 4 "Bins". If i change the formula for one of the Bins it will chnage it for all of them but I only need it on the 'e) External Income'
-
Dear
i am working on BI Publisher Desktop Version and trying to generate a RTF Template in which pivot table has to be used
Below is the format of my XML File.
-<G_C1>
<R>1</R> row 1
<C>1</C> column 1
<C1>1300001 ASL 112531 2</C1>
<C2>1 10 1.5</C2>
<C3>120000105 12.5</C3>
<C4>120000105 </C4>
<C5>OPeration</C5>
</G_C1>
-<G_C1>
<R>1</R> row 1
<C>2</C> column 2
<C1>1300001 ASL 112531 2</C1>
<C2>2 10 1.5</C2>
<C3>120000106 12.5</C3>
<C4>120000106 </C4>
<C5>OPeration</C5>
</G_C1>
-<G_C1>
<R>1</R> row 1
<C>3</C> column 3
<C1>1300001 ASL 112531 2</C1>
<C2>3 10 1.5</C2>
<C3>120000107 12.5</C3>
<C4>120000107 </C4>
<C5>OPeration</C5>
</G_C1>
......... and sow on till row 16 and column 8
i am facing two issues,
first i have to show 5 columns in cross product, but pivot table option shows option for 4 columns only
secondly characters are not shown when i preview the template its shows 'NnN' in all columns
Kindly help me in generating the template.
I have to define the template in XML Publisher of Oracle E-Business Suite R12
Regards,
Muhammad Usmancheck these samples
http://winrichman.blogspot.com/2008/08/pivot-table-cross-table-with-fixed.html
and
https://blogs.oracle.com/xmlpublisher/entry/new_skool_crosstabbing
i will let you if i know i get anything. -
Hi all,
We are having 6 measures. My requirement is that all the 6 measures needs to placed in rows one after other(each measure in one row) And in column level Fiscal year should be displayed to the corresponding 6 measures. Is this possible in pivot table...
Kindly help..urgent
Thanx in advance...
Regards,
NareshPlace measure lables in the rows and year column in column and all the measures in measures
-
Pivot table problem. Please help me create this report
Hi friends..I'm new to OBIEE. We can create the grand total column in pivot table. I need grand total as well as Grand average. How can I create a new column in pivot table that is same as grand total but calculates average.
My table structure is like this.
Facility......Date........totaldays
A..........01/01/08......210
B..........01/01/08......215
C..........01/01/08......917
A..........02/01/08......211
B..........02/01/08......211
C..........02/01/08......911
A..........03/01/08......210
B..........03/01/08......215
C..........03/01/08......917
I need the report like this..
Facility.....01/01/08......02/01/08....03/01/08...Total....AVG
A...............210.............211............210.....631......210.3
B...............215.............211............215.....641.....213.6
C...............917.............911............917.....2745....915
For this report..I created pivot table but I'm not able to calculate the average..
Can you please help..I'm new to OBIEE...
Thanks in advancePlease change your username....
Here is what you need to do...
1) In the Pivot Table View, click on the Measures column and select New Calculated Item.
2) In the pop-up window complete as follows:
Name: type "Total Average"
Function: Select "Average" from the drop-down window.
Click on the values in the right pane that you wish OBI to calculate the average for.
3) Click "OK."
You now have another column that is the average of the values in each row. -
Hi
How to show grand total two times in pivot table?is it possible
Thanks in AdvanceHave a look here:
http://obiee101.blogspot.com/2008/05/obiee-pivot-table-measure-label.html
regards
John
http://obiee101.blogspot.com -
Pivot Table page-item as a multi select
Can this be done? When placign an item in the "page" shelf of the pivot table, the default is to allow a single valeu selection, but can we allow multiple selections.
For instance, if I place region in the Page item area, can I allow the user to select "West" and "East" as opposed to just 1 distinct value?Why not just use a prompt with a multiselect box then?
It looks the same for the end user, only now he have to wait when he chooses another combo... in stead of that he had to wait only in the beginning something longer -
Multi-level UPCs (I can do as pivot table in Access and Excel, but not SAP)
I'm working for a shoe manufacturer. We've got inventory that can be grouped into "cases" as well as "open-case" in regards to UPCs. We're able to apply the UPC to individual items such as open-case stock OR case-only, but we can't figure out how we can add the groupings needed to add UPCs to individual items AND the cases associated with each shoe/size. Here's a little more detail: We sell shoes in cases, MOSTLY. Occasionally, we have a shoe model that will sell as open-case. The cases (which have a UPC) contain an assortment of sizes (each of which has its own UPC). We need to be able to access the information for the associated cases when looking at a product and when on a case, we need to see the make-up of the case - such as associated sizes, qty contained, and their respective UPCs. I know we could easily do this in Access or Excel using pivot tables... Is this POSSIBLE in SAP Business One???
You may check Sales BOM function to see if that meet your need. The case can be set up as an Sales BOM item.
Thanks,
Gordon -
Hi,
I have created a request in Pivot Table. Rows section Include Product Domain column and Columns Section Includes Month ;
measures section contains columns gross, profit, loss and YTD %. I want YTD% column to appear after Dec month and it is should come only once.
In my request it is getting repeated for every month.
It should look like following way,
-------------------------------|-------Jan-----|------Feb------|-------Mar------|-------Apr------|--------YTD %
=========|======|========|========|=========|=========|-------------------
-------------------|-Gross
Prod Dom 1-----|-Profit
-------------------|-Lossyou can include month to measures and other column row level and apply aggregation
Edited by: Chack on 20 May, 2010 12:06 PM -
SSAS Cube Hierarchy Default Member, not aggregatable in pivot table multi select, Urgent
Hi All,
I have one problem in my project ssas cube. one of the dimension hierarchy, a value has been set up as default member in calculation tab.
The problem is:
When i filter (select multiple) this defaulted value and other value in excel pivot, it is always showing default member value instead of selected members aggregated value. if i remove default member it is working fine. Can you please provide work around
for this.
Please note that, if select multiple values within that hierarchy (this time not selected default value), aggregation is working fine.
Thanks, RajendraHi Hirmando,
According to your description, the default member cause incorrect data when dragging a attribute that contain a default member to the FILTERS area, right?
I can reproduce this issue on my environment, when dropping this dimension in the filter area of my pivot table and select multiple members including the default member then only data for the default member is shown. Currently, it's hard to say the root
reason that cause this issue. In order to narrow down this issue, please apply the latest server pack and cumulative update.
Besides, you can submit a feedback at
http://connect.microsoft.com/SQLServer/Feedback So that microsoft will confirm if this is a know issue.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here.
Charlie Liao
TechNet Community Support -
SSAS Default Member Causing incorrect data in Excel Pivot Table using Multi-select in filter
I have an Excel 2013 pivot table connected to an SSAS (2012) cube. One of my dimensions has a default member specified. When I drop this dimension in the filter area of my pivot table and select multiple members including the default member then
only data for the default member is shown. Selecting multiple members where the default member is not included does not result in an issue.
I believe this may be in an issue in how Excel builds the MDX but wanted to see if there are any work arounds.
This issue can be recreated using AdvetureWorks using the following steps:
Alter the Product Dimension of the SSAS Default Member by setting the default member of the Product Line Attribute to Mountain: [Product].[Product Line]&[M]
Process the cube
Connect to the cube via Excel 2013
Drag internet gross profit to the Values area (The value will be 4700437.22 which reflects the Mountain default filter)
Drag Product Model Lines to the Filters area (you will see Mountain selected by default)
Change the filter by checking the Select Multiple Items checkbox and checking Mountain and Road (You will see that the amount does not change)
Change the filter again by selecting Road only (to demonstrate that Road has a value, 5602105.8, associated with it)
Change the filter again to select Road and Touring (to demonstrate that the correct aggregation of the two selected members is preformed)Hi Hirmando,
According to your description, the default member cause incorrect data when dragging a attribute that contain a default member to the FILTERS area, right?
I can reproduce this issue on my environment, when dropping this dimension in the filter area of my pivot table and select multiple members including the default member then only data for the default member is shown. Currently, it's hard to say the root
reason that cause this issue. In order to narrow down this issue, please apply the latest server pack and cumulative update.
Besides, you can submit a feedback at
http://connect.microsoft.com/SQLServer/Feedback So that microsoft will confirm if this is a know issue.
Regards,
Charlie Liao
If you have any feedback on our support, please click
here.
Charlie Liao
TechNet Community Support -
How to multi-search in excel pivot table axis filter against SSAS cube???
On an excel pivot table axis, we need to filter a large dimension to several members by searching the dimension using the excel OLAP filter search capability. However, when you search for something with the filter, after it finds some members, your
only choices are to select your new filter criteria ONLY. It will automatically de-select anything you searched for and selected prior. The dimension is over 10k members so does not all show up in axis filter and thus we can't select the members
we want just by scrolling through. So it would seem from excel it is impossible to do this most basic function which would be very disappointing given how basic and common the need is. There has to be some other way than creating a set the cube
to handle this. How do you accomplish this?
Excel 2013
SQL Server 2012Hi Lee,
Thank you for your question.
I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated.
Thank you for your understanding and support.
Regards,
Simon Hou
TechNet Community Support
Maybe you are looking for
-
Uploaded itunes 11.1.2 on iMac with osx 10.6.8 and it won't open
Updated to iTunes 11.1.2 on our iMac running OSX 10.6.8 and now iTunes won't open. It just doesn't respond at all no matter how I try to open it. Any suggestions?
-
Adobe Acrobat 8 Pro - Fillable Form
Attempted to create fillable form from Excel document. Received message as follows: Adobe Live Designer Designer was unable to locate critical application files. Please shut down Designer and run the installation (found under Add/Remove Programs in
-
Error in portlets while using Basic Authentication
We have the Portal on the web.Whenever anyone types the URL for the Portal welcome page he is prompted for a username and a password(facilitated by the Apache Server security by adding the relevant tag in the httpd.conf file).The following is the tag
-
RowSetIterator not returning all the rows
Hi, We have a use-case where we need to create a new row iterator to insert rows(values) in it. Immediately after insertRow(), we are reading the values by creating a secondary row set iterator (createRowSetIterator) but it is not returning all the i
-
Help needed in Transaction AR02
halo fellow SAPiens, <b>1)</b> i am new to FI module and i have been told to modify the report AR02 by which the user can see monthly addition,depreciation ....etc.........right now its yearly(fiscal year)......how can i do it.......... <b>2)</b> i n