Pivot table column alignment

Hi all

I use the Oracle 11 g database to develop my application.

I've created a generic column report.

For this I used the concept of PIVOT table.

My example query is

with pivot_data like)

SELECT DEPTNO, JOB, SAL, BISHOP

WCP

)

SELECT *.

OF pivot_data

PIVOT)

SUM (SAL)

FOR DEPTNO

IN (& P90009000_LIST.)

)

This output is

WORK BISHOP 10 20 30

--------- ---------- ---------- ---------- ----------

PRESIDENT 5000

7902 800 CLERK

7698 950 CLERK

7788 1100 CLERK

7782 1300 CLERK

7698 5600 SELLER

MANAGER 7839 2450 2975 2850

7566 6000 ANALYST

8 selected lines.

but I need the output as below

BISHOP OF WORK 10 20 30

--------- ---------- ---------- ---------- ----------

PRESIDENT 5000

THE 800 7902 CLERK

THE 950 7698 CLERK

1100 7788 CLERK

1300 7782 CLERK

5600 7698 SELLER

MANAGER OF 2450 2975 2850 7839

6000 7566 ANALYST

8 selected lines.

Come 10,20,30 pivot columns

How to do this in my application?

Thank you

Su.GI

Thanks Solomon.

I used the code below.

His job very well.

with pivot_data like)

SELECT DEPTNO, JOB, SAL, & P90009000_LIST., BISHOP

WCP

)

SELECT *.

OF pivot_data

PIVOT)

SUM (SAL)

FOR DEPTNO

IN (& P90009000_LIST.)

)

Thank you

Su.GI

Tags: Database

Similar Questions

  • Calculate the % with the pivot table columns

    I created an application with these columns:
    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
    I want to create a pivot table looks like this.
    Metric          Fast     Slow      On-Target     Total      % Fast     % Slow   % On Target
    ------------------------------------------------------------------------------------------------------
    Metric1         4           2        4            10           40        20       40
    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%.

    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:09

    Sounds 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 end

    This 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.

  • How to align an image centered in the advanced table column.

    Dear friends,

    I developed a page of the OAF with an image column in the advanced table, but by default the image column is not centered,
    How to make image centered in the advanced table column, please let me know your suggestions.


    Thank you
    Keerthi.K

    HAD,

    In your column, create a tabular presentation and a rowlayout and the image, and then put in the rowlayout. Set the horizontal alignment of the rowlayout inwards.

    Kristofer Cruz

  • White column in responses: Pivot table see

    Hello

    Greetings to all here...

    I use Oracle Business Intelligence Suite Enterprise Edition 10.1.3.4.
    I have created a report, the problem is that it shows some columns as empty when I display the result in responses, Pivot table view, the technical details:
    Column name: sales - MTD
    The column formula: IFNULL ('-common measures ".") Business-MTD sales", 0.00)
    Aggregation rule: default

    sample data:
    JAN Feb customer account number
    7053 < white > 22.00

    Data for Jan present in the database, infact for January, the column is not non-existent in databased, Feb is present and is displayed correctly.

    The column is of type DOUBLE, I want to display 0.00 instead of white, asking for your help.

    I did a search in the forum, but could not get a solution.

    Try this,
    Go to your report, the column - common measures. "' Turnover - BAT" in data marker select custom format
    and put it in #, # 0;-#, # 0; 0
    I hope it will work.

    Concerning
    Blackburn

  • Sort data in pivot table

    Hi Experts,

    Here's the requirement I need to sort the text Text_field field say to sort this column, I called another field. Sort_Text_field.

    I have the pivot table as follows

    Can I sort Text_field even if Sort_Text_field is not in the PivotTable on the side.

    Thank you!

    Month1-(Jan) Month2-(Feb)
    Text_fieldMetricValue1MetricValue2


    Thank you!!

    Just in case if helps others. Tim Dexter tanks

    Follow this link: https://blogs.oracle.com/xmlpublisher/entry/new_skool_crosstabbing

    Customization

    One new feature that I discovered this week is the ability to show a single column and sort by another. I got a data set which was extracting the month abbreviations, we wanted to show for months through the top and headers of lines on the side. As you know XSL is not very good with dates, in particular recognizing the names of months. He just wants to sort them alphabetically, so, after comes before Jan, etc..
    A way around this is to generate a number of months to the sides of the month and which allows to sort. We can do that in the crosstab, unfortunately it is not exposed in the user interface still but its doable.

    Go back and take a look at the initial crosstab command. especially the line inputs and columns. There, you will find the sort criteria.

    "ProductsBrand {, o = a, t = t}, PeriodYear {, o = a, t = t}.

    Note these key commas inside the braces? Because there is no field that precedes them, this means that the crosstab should sort on the column before the brace that is PeriodYear. But you can insert another column in the data set to be sorted. For myself how I needed to work.

    <>" _Fund_Type_._Fund_Type_Sort_, o = a, t = n} ';' _Fiscal_Period__Amount__._Amt_Fm_Disp_Abbr_ {_Fiscal_Period__Amount__._Amt_Fiscal_Month_Sort_, o = a, t = n} ';' _Execution_Facts_._Amt_ ';' amount '? >

    Excuse the horribly verbose XML tags, good ol' BIEE: 0) emboldened columns are not in the table, but in the data set. I just open the field, dropped and changed the value type (t) is 'n', number, instead of the default 'a' and my crosstab started sorting how I wanted that it.

    If you find other tips and tricks, please share in the comments.

  • Remove sorting in a Pivot table view

    Hi people,

    How to remove the column header sort options in the pivot table view?

    Thank you

    AJ

    You want to remove the small arrows on the column header in a pivot view?

    If so, the options are available in the analysis criteria tab. The problem is it cannot be set to a point of view, they perform the whole analysis

    In the criteria-> Properties tab right next to the filters and the stages of selection analysis-> Interactions tab.

    Mark, if this can help

  • How to customize the background color of a table column?

    Hi all

    For example, I want a column of table still to be dark gray, is not to be alternative by default.

    Thank you

    Jason

    It is probably best (makes the code more readable and better separation of concerns) to just set a style on your TableCell class, can actually define the styles in an external style sheet.

    Something like:

    @Override
    public void updateItem(Object item, boolean empty) {
         super.updateItem(item, empty);
         setText(item.toString());
         getStyleClass().add("special-table-column");
    }
    

    and then in an external style sheet

    .special-table-column {
         -fx-background-color: -fx-focus-color, -fx-cell-focus-inner-border, -fx-selection-bar ;
         -fx-padding: 0 3 0 0 ;
         -fx-alignment: center-right ;
    }
    

    You can obviously replace "special-table-column" with something that logically represents what you are doing.

  • How to get the QDR of ADF Pivot table datacell

    JDeveloper 11.1.1.5 version
    Java 1.6
    The ADF faces

    I want to click commandlink in a data cell that sends the value of the header cells to a bean of support. I think that we must get the QDR of a clicked data cell, but how?

    I created the PivotTable: column headers consist of a variable number of dates; row headers consist of the names of the units. The data that cross are a percentage of variance using energy over time. (There is no calculation in the PivotTable, just displaying data from the view).

    ........ 11 Jan 12 13 Jan Jan jan 14. .etc
    Module-1 2.00 5, 25 - 9.30-11.15
    Unit-2 - 554.22 497.00 7.70 2.00
    Unit-3 10.00 - 5, 00 5.00 1.00

    To the cell above it with 497.00 value, the user must click this value (commandlink) and the bean 1) calculate the values of the unit and the date to use as parameter values for ExecuteWithParams under another iterator and 2) navigate to another page using this another iterator.

    It seems that the QDR (reference data) is involved, but can't find enough information about how to implement the same.

    Here are the PivotTable on the jspx:

    < dvt:pivotTable id = "pivotTable1".
    Summary = "reading analytical pivot table.
    value = "#{bindings." CdsaReadingsItfVwView1.pivotTableModel}.
    var = 'cellData.
    varStatus = "cellStatus" >
    < dvt:dataCell >
    < af:commandLink id = "cl".
    Text = "#{cellData.DataValue} '"
    action = "#{pivot_bean.commandlink_action}" / >
    < / dvt:dataCell >
    < / dvt:pivotTable >



    In the bean, we try to getPivotTable(), but it is always null.

    Any direction is welcome.

    David K

    Check how the PivotTable selection demo was created:
    http://jdevadf.Oracle.com/ADF-richclient-demo/faces/feature/PivotTable/pivotTableSelection.JSPX
    Code for this demo here:
    http://www.Oracle.com/technetwork/developer-tools/ADF/documentation/ADF-faces-RC-demo-083799.html

  • Pivot Table guest issue

    Hello

    I can place the Pivot Table guest column does not display values section in the menu drop-down showing only a single value.

    Version is 11.1.1.6.4 OBIEE and Mozilla Firefox 19.0.2

    How to overcome this problem.

    THX,

    If the column contains more than 1 value then browser. Check in IE or Chrome.

  • Exclude a measure the total general dynamic level 'Lines' of a pivot table

    Experts,

    Is it possible to exclude a measure the total general dynamic level 'Lines' for a pivot table?

    Version - OBIEE 10g

    Kind regards
    LIBERATOR

    No, I mean not the dropdown list above when you edit the formula in the column. It of there on 11g but don't remember off the top of my head if it is in the same place on 10g.

    Paul

  • Convert pivot table to a table in the same answers BI report

    Hello

    I have a simple BI answers report. I used a PivotTable when in fact I have no aggregate
    so it would be faster performance (I said) to use a table for the view, rather than on a pivot table view.


    Is there a quick way to convert a pivot table view to a table view, without having to re - select
    all the columns all over again?

    Thanks a lot for all the replies.

    -Greg

    user1636556 wrote:
    Thanks for your reply. How exactly "choose you as ' a table view. At runtime, I get the view composed upwards.
    Then change the drop-down menu that says "Compound Layout" and choose "Table" currently? I tried that and
    the PivotTable returned at run time. Or do I do 'View Edition' on the existing PivotTable and change something that
    for a Table view?

    Thanks for your help.

    -Greg

    Compound mode is the "view holds that all views." On the upper right side, you can click on the Red 'X' and remove the Pivot Table view. You can then "Add View", and select the Table view. Compound mode will be your title and Table.

    So to answer your question, no, not "change the drop down menu that currently says"Compound Layout"and choose"Table"that takes you only to the view of the Table, because it does not affect the report itself. That's why at run time, you still get the Pivot Table View. Follow my instructions in the previous paragraph. Good luck!

    Edited by: David_T December 9, 2011 10:25

  • reg: pivot table calculation

    Hello



    is there a way to get the average and total calculated in the pivot table based on a column?


    example,

    in the time of country state id

    in pivot, I want to calculate total and average for the country / state of time according to the number of id of country / state


    Thank you

    Yes, you can. Make use of elements calculated to reach.

  • Calculation of pivot Table

    Hello

    I need to create a named calculation in a pivot table similar in total general on columns. However, I need to customize the calculation to perform on some lines and average amount on some lines.

    How can it be reached, the calculations will be appear in the same column for each row.

    Can anyone help?

    Thank you

    I don't know or force to try any time, but stuck in mind.

    Contribution - ID no
    9147.29 - 1
    1043.16 - 1
    Total 10190.45 - 2

    create a new column and write f (x) case when 1 = column_name 0 another amount (contribution) / sum (ID no.) end

    see you soon,
    KK

  • 10g pivot table out on the grant table

    Hi, experts,

    No there is no way to sort the pivot table according to the values in table of grant?

    Thank you very much!

    example is necessary...

    do you mean void totals?
    I'm assuming you own m1, d1, d2, d3 etc and applying subtotals on d2 dimension...

    If so,.
    create a column with fx:
    sum (m1 d1, d2), then in the criteria tab himself sorting on... can it exclude pivot...

    If subtotals on d1 (d1 m1) just sum is enough...

  • 11 total Pivot Table prompt g

    I created a PivotTable in which I have two columns listed in the Pivot Table guest area (formerly area pages in 10 g).

    When you change the PivotTable, the layout section shows a warning next to the Pivot Table guest words icon. I clicked this icon and selected before.

    The drop-down list of the column (far left) ranked first in the Pivot Table of guests watch now an entry of all values higher than retail values, as it should.

    However, the drop-down list for the other column doesn't have an entry of all values .

    In addition, by selecting the entry of all the values for the first column is completely HIDES the drop-down list for column 2 and the PivotTable displays a grand total of all the values for the second column.

    It makes no sense at all. I want to see all values for my first column and be able to continue to select individual values for my second column, or maybe a all the values for the second column.

    It there is no documentation on this feature, because the OBIEE 11 g user's Guide does not contain the string Pivot Table invites.

    This signals that a bug?

    I have not yet explored 11g.
    But in 10g so the columns in the page area are displayed as guests. The messages appear to be cascaded, so only the first column in the page area contains "All Pages" option.
    Try if you can modify the XML to produce the desired effect.

    So I think this isn't a bug with 11g, rather inherited 10 g.

    -bifacts
    http://www.obinotes.com

Maybe you are looking for