Regarding Pivoting

Folks,
I have a table 'a' as follows:
VAL1     VAL2     VAL3
1     2     100
1     3     200
2     2     300
2     3     400Now I need the output as follows after writing a query:
1 100 200
2 300 400I have accomplished this by pivoting as follows after reading asktom articles:
SELECT   val1,
         MAX (DECODE (val2, 2, val3, NULL)) a,
         MAX (DECODE (val2, 3, val3, NULL)) b
    FROM a
GROUP BY val1My question is I am not still clear on how this internallly works. If someone can explain what happens stepwise.....
Specially while using max, Lets say I ignore Max function (though it will throw an error), at a given point how would the data look like? 1 100 200 and then 2 300 400 and then max would give me the same values.... or is it that at a given point data would look like 1 100 null, 1,null,200, 2,200,null , 2,null,100 ???
I mean would really appreciate how each step happens.
Thanks very much
saff

Hi,
You want to understand how you got this result set:
val1 a    b
==== =    =
1    100  200
2    300  400Let's look at any one cell of this output, say the column a for the row where val1=1. The number in that cell is 100. How did that number get there? First of all, you're GROUPing BY val1, so everything on that row has to have come from a row where val1=1.
But there were two rows in the table with val1=1. How did 100 get picked? Look at the expression that produces the a column:
        MAX (DECODE (val2, 2, val3, NULL)) a,The DECODE expression says, "If val2=2, then return val3; otherwise, return NULL." That value (either val3 or NULL) will thenbe processed by MAX. Like all aggregate functions, MAX, ignores NULLs, so only the rows with val2=2 will do anything. So this cell will contains the greatest val3 value from all the rows that have val1=1 and val2=2. There is only one such row, so it will necessarily be the MAX. (In fact, if your table is unique for val1 and val2, then all such cells will have a most one value that contributes to it, and it won't matter if the aggregate function you use for the pivot is MAX, MIN, SUM or AVG: when there is only one non-NULL number in the group, they all return that number.)
Using DECODE like this is sort of like having a WHERE-clause that only applies to a single column. The only difference is that a WHERE-clause quits looking at the row, but DECODE turns it into NULL. (MAX, then, quits looking at the row, so the net result is the same.) To undestand better how DECODE works like WHERE, try re-writing any query that has a WHERE-clause to use DECODE (or CASE) instead.
The important thing about pivots is that the data you start with has to identify to which row and column of output each row of input go. In your example, val1 tells to which row it will go, and val2 tells which column (val2=2 goes to column a, val2=3 to column b, anything else isn't displayed.)
If you want to know what the data looks lie at any point in time, try it and see! Try this query
SELECT    val1
,         val2
,         DECODE (val2, 2, val3, NULL) a
,         val3
,         DECODE (val2, 3, val3, NULL) b
FROM      a
ORDER BY  val1
,         val2;The query above will show you what the data looks like before the GROUP BY.

Similar Messages

  • Regarding Pivot View

    Hi Guys,
    I have a question that in pivot view we can show column name in report.
    since it only shows data nof columns in pivot view.

    No Limitation for measures in pivot view

  • 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

  • How to disable constrain in Pivot View

    Hello everybody,
    I stuck with a problem regarding pivot table. As you all know whenever we put 2 cols. in page section of pivot then 2nd column is automatically constrain according to 1st column selection.
    But I want the functionality like Dashboard Filter prompt in Pivot Table.
    So, that if user want to place constrain/ skip column he can!
    Is it possible in BI's pivot view.
    e.g I want such that
    1st col : Country
    <Blank> -- Skip to select
    All
    India
    Australia
    America
    UK....
    2nd col : State
    <Blank> -- Skip to select
    All
    <Various States of Countries>
    So whenever I send <Blank> or All from Country column it shows All States in 2nd one for selection.
    Please, Help me out.
    Thanks

    Not sure what you mean by...
    So whenever I send <Blank> or All from Country column it shows All States in 2nd one for selection.... because if you select "All Pages" for the Country column, then the State column would not be constrained.
    So how do you get the "All Pages"?
    In the Country column which you have in your Pages section of the Pivot Table, click on the "sigma sign" and select "Before." This will give you the "All" choice you seek for the Country column.
    I hope this is what you are trying to achieve.

  • Can anyone provide Error code list and causes for OBIEE10g/11g ?

    Hi
    Can anyone provide Error code list and causes for OBIEE10g/11g ?
    Regards
    Srini
    Edited by: Srini on Feb 18, 2012 10:41 AM

    Hi,
    List of Bug Fixes Included In OBIEE 11.1.1.5.0
    Admin Tool
    •7538753 SAP BW IMPORT DOES NOT RETRIEVE UNIQUE NAME FOR MEASURE COLUMNS
    •10012297 ADMIN TOOL CRASH ON VERY LARGE EXPRESSIONS – OVERFLOW AT APPROX 3200 CHARACTERS
    •10032385 TABLE MISSING IN SQL “FROM” CLAUSE – FWD PORT 8308443 TO 11G
    •10045212 EQUALITY EXPRESSION IN LTS “WHERE” CAUSES INTERNAL SQORRQLIST ERROR ON QUERY
    •10264475 ADMINISTRATION’S “SHUTDOWN SERVER” MENU SHOULD BE REMOVED
    •10265121 ADMIN TOOL EXPRESSION BUILDER CRASHES ON DOUBLE-BYTE LOGICAL COLUMN NAME
    •10394725 ON-LINE MODE CHECK-IN OF DYNAMIC INIT BLOCK CAUSES [43058] REFRESH LOCK FAILURE
    Answers
    •6521146 ERROR: “NO FILTER” WHEN USING “COMBINE WITH SIMILAR REQUEST” – UNION
    •7534635 INACTIVATING DRILLDOWN ON COLUMN VALUE ALSO INACTIVATES COLUMN HEADER LINK
    •9026854 CLARIFICATION REGARDING DATA FORMAT WHEN COMBINING REQUESTS
    •9107277 KEEP THE NUMBER PRECISION IN DATABASE WHEN “DOWNLOADING TO EXCEL”
    •9524080 PIVOT TOTAL DIFFERENT TO TABLE TOTAL WHEN REPORTAGGREGATEENABLED TRUE
    •9697529 JAPANESE CHARACTER SET NOT PASSED CORRECTLY TO DRILL REPORT IN FIREFOX BROWSER
    •9871470 SORTING ON A NULL VALUED COLUMNS GIVES ASSERTION ERRORS
    •9886904 CORRECT DOC FOR ADDING CUSTOM DATE FORMAT STRING
    •9918283 CORRECT DASHBOARD FORMATTING PROBLEMS WITH SCROLLING
    •9928318 ROW HEADER MISSING AT PIVOT TABLE VIEW FOR MIGRATED REPORTS IN 11G
    •9968574 SOME UPGRADED 10G CHARTS SHOW UP JAVA EXCEPTION
    •10023165 MAPS DO NOT WORK IN MAP VIEWS WHEN JOIN COLUMN CONTAINS A “&” CHARACTER
    •10065166 GAUGE RANGE IS NOT UPDATED WHEN IT CHANGES THE FIELD VALUE
    •10078041 ACTION LINK DOES NOT WORK WHEN COMPOUND LAYOUT ONLY HAS A MAP VIEW
    •10091354 “SCALE MARKERS” OPTION IS MISSING IN VERTICAL AXIS 2
    •10147762 CANNOT SET GAUGE FOOTER (TITLE), KEEPS SHOWING “UNDEFINEDUNDEFINEDUNDEFINED”
    •10182955 BUBBLE CHART IS NOT BEHAVING AS EXPECTED
    •10213761 CONDITIONAL DASHBOARD SECTIONS (GUIDED NAVIGATION) ALWAYS RUNS REPORTS
    •10229397 CANNOT SAVE REQUEST USING STANDARD DATE FORMATS.
    •10282140 CELL IMAGE AT BLANK CELL OF PIVOT TABLE IS NOT DISPLAYED WHEN USING COND FORMAT
    •10296730 UNABLE TO USE PRESENTATION VARIABLE IN SCALE MARKERS
    •10312496 CHARTS. MEASURE LABEL IN GRAPH PROMPTS DOES NOT CHANGE CONTENT OF THE CHART
    •10312795 ACTION LINK ON COLUMN HEADING NAVIGATION DOES NOT CONSIDER PROMPT VALUES
    •10329343 CLICKING A LINE GRAPH BETWEEN TWO DATA POINTS DRILLS TO LAST VALUE IN HORIZONTAL
    •10337649 PIVOT TABLE SHOWS BUTTONS FOR SORTING ON CALCULATED ITEMS.
    •10402102 INCORRECT RESULT WHEN USING [NEW CALCULATED ITEM] PROP IN PIVOT TABLE
    •10414887 DRILL DOWNS NOT WORKING IN CHART PIVOTED TABLE SELECTED FROM VIEW SELECTOR
    •10418875 CHART SIZE IS CHANGING AFTER WEBCAT UPGRADE FROM 10G
    •10634175 GRAPH ENGINE IS NOT RESPONDING
    •10639913 COMPLETE TEXT IS NOT SAVED IN DB IF CURSOR IS MOVED AWAY DURING INSERT
    •11711658 FILTER NEEDS TO SUPPORT UNTYPE LITERAL FOR RANK OPERATOR AS 10G DOES
    •11805468 CUSTOMIZED GAUGE VIEW IS NOT CONSISTENT WHEN EXPORTED AS PDF,HTML AND XLS
    •11817696 INCORRECT FILTER IS BUILT IF FILTER IS CONTRUCTED BEFORE SELECTING REQ. COLUMNS
    •11845286 PIVOT TABLE WITH PERCENTAGES, GRAPHED PERCENTAGE VALUES DISPLAYED ARE INCORRECT
    •11894921 GRAPH LABEL OPTIONS NOT AVAILABLE IN 11G
    •11895279 INCORRECT FILTER VALUE WHEN USING ACTION LINK WITH GRAPH
    •12412666 ALL PAGES LOSES CONDITIONAL FORMATTING
    •12561361 PSE FOR BASE BUG 10295403 ON TOP OF 11.1.1.5.0 FOR GENERIC OS
    CHARTING
    •8990756 MISLEADING INFORMATION IN DOC REGARDING PIVOT TABLE SETTINGS
    DASHBOARDS
    •7459700 ABILITY TO SPECIFY FIXED COLUMN WIDTH TO A DASHBOARD PROMPT
    •10177865 OBIEE 11G : DEFAULT VALUES CANNOT BE DE-SELECTED FROM MULTI SELECT PROMPT
    •10279722 DASHBOARD SLIDER PROMPT SHOWS THUMB VALUES WITH TWO DECIMAL PLACES FOR INTEGERS
    •10279829 DASHBOARD SLIDER PROMPT SHOWS WRONG VALUES FOR “ALL COLUMN VALUES” OR “SPECIFIC
    •10310511 “REQUIRE USER INPUT” MESSAGE APPEARS THE FIRST TIME ONLY FOR THE REQUIRED PROMPT
    •10389799 DASHBOARD NAVIGATION MAY CAUSE GETELEMENTBYTAGNAME ERROR IN IE
    •10411545 PROMPT WITH BETWEEN OPERATOR AND SQL DEFAULT VALUES ARE NOT UPGRADED PROPERLY
    •11056057 ERROR WHILE UPGRADING THE DASHBOARD WITH CERTAIN FILTER FUNCTIONS
    •11076452 ABILITY TO CONSTRAIN PROMPTS AGAINST A SLIDER PROMPT
    •11717024 ERROR 500 OCCURS WHEN SETTING ACCESSIBILITY MODE TO ON
    •12620143 PSE FOR BASE BUG 12561330 ON TOP OF 11.1.1.5.0 FOR LINUX X86 [46] (PSE #602152)
    INSTALL
    •9459177 PREREQUISITES FOR DEPLOYMENT ON SEPARATE MACHINES
    •9540009 UNIXCHK.SH ENCOUNTERS HOST NOT FOUND ERROR WHEN DNS IS NOT AVAILABLE.
    •10071302 ENTERPRISE INSTALL: CONFIGURE PORTS : FORMAT OF INI FILE
    •10126542 OBIEE 11G INSTALATION FAILS AT AS INSTANCE CREATION DUE TO PERM SIZE ERROR
    •10287335 CANNOT START BISERVER1 . SWITCH TO JSSE FRAMEWORK REQUIRED
    •10302421 OBIEE 11G WINDOWS PROMPTS FOR USERNAME / PASSWORD AFTER ENCRYPTING CREDENTIALS
    •11849674 SAG: DISCREPANCY IN DOCUMENTED ORACLE DATABASE REQUIRED FOR MAPVIEWER
    MIGRATION
    •7432799 ORACLE EUL CONVERTER CRASHED WHILE GENERATING A REPOSITORY
    REL_NOTES
    •12604761 TWO STEPS OF THE UPGRADE TO 11.1.1.5.0 ARE NOT CLEARLY DOCUMENTED
    SCHEDULER
    •10036466 “RE-RUN INSTANCE(S) NOW” MENU IS NOT AVAILABLE FOR COMPLETED JOB INSTANCES
    SECURITY
    •8996295 PROVIDE DETAIL INFORMATION TO SETUP WNA(KERBEROS) FOR OBIEE AUTHENTIFICATION
    •9216995 PROVIDE LATEST DETAIL INFORMATION ABOUT HOW TO SETUP LDAP SSL FOR OBIEE
    •10194154 TECHNOTES- PROVIDE DETAIL INFORMATION TO SETUP WNA(KERBEROS) FOR OBIEE AUTHENT
    •10198837 BIEEHOME LOGIN PAGE IS NOT DISABLED EVEN AFTER ENABLING THE SSO
    •10218031 USING EXTERNAL DB TABLE TO SET ROLES SESSION VARIABLE DOESN’T ACCEPT LONG NAMES
    •10373788 IF OBJECTGUID PUBLISHED AND SAMACCOUNTNAME CHANGED USER CANNOT CONNECT ANYMORE
    •11731080 QA:SECURITY GUIDE NEEDS UPDATE FOR DEFINING A USER SESSION VARIABLE
    SERVER
    •6510747 NETWORK FAILURE DURING PHYSICAL QUERY HANGS END USER WITHOUT ERROR MESSAGE
    •6836444 OBIEE SERVER SYSTEM DATE IS WRONG AND DOES NOT MATCH MACHINE SYSTEM DATE
    •8371912 BI SERVER CRASHES ON NAVIGATION SPACE MAP RACE – SR 3-887711721
    •9433198 DOCUMENT SYSLOG ENTRIES IN SYSTEM ADMINISTRATOR’S GUIDE
    •9696424 DOC INSTANCECONFIG PARMS ALLOWEDLANGUAGES & ALLOWEDLOCALES IN SYSADMIN GUIDE
    •9954411 PSR:MOD_SUPPORTED NOT ENABLED FOR TERADATA AND CAUSES CAMPAIGN SLOW PERFORMANCE
    •10258683 REQUEST WITH COMPLEX FILTER IS CONSUMING ALMOST ALL CPU & NO SESSION IS CREATED
    •10258755 EXCEL FAILS TO CONNECT TO 11G BI SERVER USING ODBC DSN
    •10335924 REPORT-BASED TOTALS FAIL ON MEASURES CONTAINING AGGREGATION EXPRS SUCH AS FILTER
    •10374571 NEED FLEXIBILITY TO OVERRIDE HOSTNAMES WHEN CUSTOMER DNS IS INCORRECT OR BROKEN
    •10650122 PIVOT VIEW WITH UNION OF NON – COMPATABLE TYPE ERROR IN OBIEE 11G AFTER UPGRADE
    •11804596 NQQUERY LOG LEVEL 2 IS TOO VERBOSE – BACKPORT 10308263 TO 11.1.1.5
    •11809295 NQUDMLGEN NOT GENERATING UDML FILE IN UTF FORMAT
    UPGRADE
    •9886765 ERRORS ENCOUNTERED WHEN UPGRADING WEB CATALOG USING UA.BAT
    •10121344 ERROR IN LOG USING UA TO UPGRADE BI SCHEDULER SCHEMA ON SQL SERVER DATABASE
    •11069928 UPGRADE SHOULD HANDLE PROMPT WITH INCONSISTENT VALUES AS 10G DOES
    WEB_ADMIN
    •8564456 SHARED FOLDER ACCESS PERMISSION ISSUE
    •9381764 CATALOG MANAGER COPY FUNCTION NOT WORKING AS EXPECTED
    •9739865 EXITING MANAGE SESSION RESULTS IN HTTP ERROR
    •10016252 LACKING INFORMATION ON FORCEABSOLUTECOMMANDURL FOR ABSOLUTECOMMANDURLPREFIX
    •10144989 WEB CATALOG DOES NOT UPGRADE TO 11.1.1.3.0
    •10218524 VALIDATION ERROR AFTER THE UPGRADE OF WEBCATALOG TO OBIEE 11G
    •11723425 INCORRECT DEFAULT VALUE OF DEFAULTROWSDISPLAYED IN THE INSTANCECONFIG.XML
    •11827202 OPMN NOT STARTING AFTER SETTING UP THE REPLICATION AGENT
    WEB_GNRL
    •10191078 FILTER VALUES ARE RESET IN GO URL WHEN COLUMNS ARE SORTED OR RE-ARRANGED
    •10360461 NEED ABILITY TO CONTROL NEW, DASHBOARD AND OTHER HEADER LINKS
    •11780508 10G COLUMN FILTER PROMPT WITH PROMPTCAPTION ATTR NOT UPGRADING
    •12416695 TOOLTIP EMPTY IN MAPVIEWER
    WEB_INTGRT
    •10294759 FMAP-REFERENCED IMAGES IN ANALYSIS HEADERS DON’T APPEAR IN DOWNLOADS TO EXCEL
    WEB_MKTG
    •8692820 DIRECT DATABASE CAMPAIGN LOAD FORMAT COMBINED LISTS FAILS
    •9908019 SAW SERVER CRASH WHEN LOADING A PARTICULAR CAMPAIGN
    •9935859 UNGROUP OF SEGMENT BLOCKS CORRUPTS SEGMENT DEFINTION AND BAD COUNTS
    •10331355 MOVING CRITERIA WITHIN A SEGMENT’S GROUP CORRUPTS THE INCLUSION OPTIONS
    Thanks,
    RM

  • Crosstab Builder doesn't appear as an Insert option for BIP Desktop

    According to entries in the Forums.oracle.com, the Crosstab Builder was rolled out in 10.1.3.2 (BI Publisher
    Yet when the 10.1.3.4 BI Publisher desktop plugin is installed alone the BI Publisher > Insert > Crosstab functionality does not appear.
    Are there any special requirements for making this functionality appear?
    Note: Oracle Enterprise integrates BIP into the PeopleTools layer as "XMLPublisher". Users install the BIP Desktop tool alone without having BIP Enterprise installed on the same desktop. Could there be libraries installed with the Enterprise layer that are required to see the Crosstab Builder option in the menu?

    In Global Support we are using BIP 10.1.3.4 Build 129 and DO see the Insert > Pivot table. The customer is using 10.1.3.3.2 and "Cross Tab" is in the menu.
    Does this mean there was an internal product name change for the same functionality from "Cross Tab" to "Pivot Table" with the roll-out of 10.1.3.4? The Desktop Plugin 10.1.3.4 built-in Help has a whole section regarding "Cross Tab [Builder]" but nothing regarding "Pivot".
    Can you help point to documentation for this feature? A check of 10.1.3.4 New Features, Release Notes, and Developer's documentation doesn't find any hits for "Pivot" or "Cross tab" and only one minor reference to both in the User Documentation under "Online Analyzer". Does this mean the feature is only available as part of the "Online Analyzer"?
    I am trying to narrow this down so as to be able to help determine if Crosstab/Pivot is a feature supported by PeopleTools' integration of BIP.
    Thanks for your help.

  • Create a percentage matrix

    Please assist, from this query I need help creating a percentage matrix of distributions for 0, 2002, and 2005.
    TO_CHAR(OH.CREATED_TS,'DD') 0 2002 2005
    With this Code:
    SELECT * FROM ain.IMPL_RESPONSE_HEADER irh
    WHERE irh.created_TS BETWEEN to_date('01/01/2013 00:00:00','mm/dd/yyyy hh24:mi:ss')
    AND to_date('03/14/2013 00:00:00','mm/dd/yyyy hh24:mi:ss')
    AND Fiber_Response_Code ='2002'
    OR Fiber_Response_Code ='2005'

    Hi,
    989618 wrote:
    Can you please help me create this matrix, I need to convert the data into days: TO_CHAR(OH.CREATED_TS,'DD')I need some help from you.
    Post CREATE TABLE and INSERT statements for a little sample data, and the exact results you want from that data. Explain, with specific examples, how you get those results from that data. Originally, it sounded like you wanted separate columns for separate years. Now it sounds like you want separate columns for separate days. Without a concrete example of what you want, we don;'t even know what the problem is, let alone the solution.
    Simpfy the problem. If you really need something for all 31 days of the month, you don't have to post all that much data. Pretend there are only 3, or 4 days in the month, and post sample data and results for those 3 or 4 days. If you make it clear what you really need to do, we'll find a solution that works for the more complicated real data as well as for the simplified test data.
    You need to say which version of Oracle you're using. Like all the things people demand of you in this forum, it's for your own good. For example, a new SELECT ... PIVOT feature was introduced in Oracle 11.1. If you're using Oracle 10.2, a beautiful solution using SELECT ... PIVOT won't help you. On the other hand, if you do have Oracle 11, you don't want a more complicated, slower solution just because it works in Oracle 10.
    Read the forum FAQ {message:id=9360002} It can really help you.
    Have you read the forum FAQ page regarding pivots? {message:id=9360005} What did you try friom that page? What problems did you have?

  • Require help to solve this sql query

    Hi
    With the help of sql I a making report.But there is a problem
    my query is like....
    select x,y,(select count(z) from tab)
    from tab1
    now i want data ' y' columnwise
    suppose y is a circle(CITYs in particualr region) and x is a region(SOUTH,NORTH,EAST,WEST)
    i want regionwise circle details
    i Know about group by but it doesnt work here..

    Hi,
    YAL regarding [pivot | http://asktom.oracle.com/pls/ask/search?p_string=%22rows+to+columns%22]
    Edited by: hoek on Jun 18, 2009 9:46 AM fixed link

  • Regarding calculated item in pivot view in obiee11g

    Hi All,
    i am using two pivot view in my report.
    i am using calculated item for first pivot view. but it is also applying in second pivot view.
    i want it to apply only at view level but it is applying at report level.
    please help me to find the solution.
    Edited by: 914101 on May 8, 2012 11:05 PM

    Hi,
    Create two pivot reports and then apply calculated item for one pivot and leave for other pivot.Hope this helpful,still if you are not getting please elaborate your quite descriptive.

  • Regarding % in Pivot view

    Hi Experts,
    We have a requirement we have built the following snapshot report with a PIVOT table in OBIEE Answers
    We would like to show the margin % in the column
    The formula for this is (Margin/Sale)*100 ..
    But we are unable to implement it in PIVOTE view
    Please let me know how to do this
    *     A     B     C     Grand Total*
    *#of SKUs*     89     113     3156     3358
    Sale     4146976     781763     258734     5187474
    Cost     2748850     509615     212748     3471213
    Margin     1398127     272148     45986     1716260
    Margin%
    Edited by: user12027684 on Aug 5, 2010 4:22 AM
    Edited by: user12027684 on Aug 5, 2010 4:23 AM

    Hi,
    Create a column with Fx as (Margin/Sale)*100 and use it in pivot table.
    Thanks
    Sandeep

  • Average & SUM in a Single criteria in the Pivot View

    Hi,
    Can you plese let me know whether it is possible to have SUM at the Grand Total level & Average on the Right Hand side of the Pivot Table view at the same time.
    Thanks & Regards
    Siva.

    Hi,
    The way you want to do it is not possible.
    What you can do is make a union of 2 reports one is using the Sum and the other the AVG and not use the Grand total provided by OBIEE.It's kind of creating your own Grand Totals
    Look at this thread it will help:
    http://obiee101.blogspot.com/2010/08/obiee-combine-with-similar-request.html
    If you are using pivot table you can think about a new calculate item as a GT
    http://varanasisaichand.blogspot.com/2010/12/aggregate-functions-on-grand-total.html
    Best regards
    Adil
    PS: Please don't forget to close the thread and assign points when your question is answered
    Edited by: adil.harrab on Jun 6, 2011 1:36 PM

  • Error when creating pivot table in BI publisher template

    When I try to create a chart or pivot in BI publisher it keeps throwing error
    'Please load Datasource first'
    It allows me to create table so I am not sure why is complaing when creating a pivot.

    Hi
    This error you are getting while creating RTF template right?
    yes, before proceeding to use the columns you need to load the XML data of your data model into your template
    1. Open Microsoft Word.
    2. From the Oracle BI Publisher menu, select Log On.
    3. Enter your BI Publisher credentials and the URL for the BI Publisher server. (Contact your system administrator if you do not know the URL.)
    4. The Open Template dialog presents the same folder structure as your BI Publisher Reports home page. Select the report for which you want to build a template.
    5. Select Open Report to load the data to the Template Builder; or double-click <New> in the Layout Templates pane.
    Note that any existing templates will be listed in the Layout Templates pane.
    select <New> in Layout template section than select Open layout tempate to get automatically load your data into template..
    ELSE
    do manually,
    in publisher,
    after saving your report go to view the report
    select data template and import that to your local drive.
    now in your MS-Word.. in bi publisher toolbar
    you find Data option, then select the load xml and give that path...
    after this you can carry on creating charts or tables..
    Hope this is what you want..
    Thanks & Regards
    Kishore Guggilla

  • Can any one tell how to create pivot table

    Hi ,
    Am trying to create a pivot tabel in the MDM Import Manager. Iam able to see the preview of the pivot table which i want to create. But when i try to click "OK" button, an error message getting displayed like...
    "The new table cannot be created because the data source is not updatable.You may need the data source to an updatable format such as Microsoft Access before proceeding".
    Due to the above error am not able to create pivot table, plz let me know if any one know how to solve this problem
    Thanks & regards
    Praveen k

    Hi Praveen ,
       The solution to your problem is -
    The data source must be updateable in order for MDM to
    create the new pivot or reverse pivot table. However, you can still
    perform the steps leading up to table creation – including the preview –
    even on a data source that is not updateable, so that you can explore
    pivoting or reverse pivoting as a transformation option. If you then
    decide you want to actually create the new table, convert the data
    source into a format that is updateable (such as Microsoft Access) and
    perform the pivot or reverse pivot on the new data source.
    To create a pivot table, you must identify the source fields that
    participate in the pivot, which ones contain metadata and which ones
    contain data, which ones must be combined, the one-to-one
    correspondence between metadata and data fields and/or field
    combinations, and the key field or fields.
    To create a pivot table:
    1. In the drop-down list of source tables, make sure the table you want to
    pivot is the current source table.
    2. In the Source Hierarchy tree, select all the field nodes corresponding to
    both the metadata fields and the data fields by which you want to pivot.
    3. Right-click on one of the nodes and choose Create Pivot Table from the
    context menu, or choose Source > Create Pivot Table from the main
    menu
    4. MDM opens the Create Pivot Table dialog
    5. In the Key Fields dual-list drop-down control, move one or more fields
    from the Available Fields list to the Selected Fields list to identify the
    key fields on which to perform the pivot
    6. In the dual-list control of fields, drag-and-drop the data fields from the
    Field Values Become Field Names list to the Field Values Become
    Field Values list
    7. If necessary, select two or more fields in either list that must be
    combined into a field combination, and click on the Combine button, or
    right-click on one of the fields and choose Combine from the context
    menu
    8. If necessary, drag-and-drop fields or field combinations within each list
    to create the one-to-one correspondence between metadata fields and
    data fields.
    9. Click on the Preview button to display a preview of the first ten records
    of the pivot table
    10. When you have verified that the pivot operation you have defined will
    have the desired effect, click OK to close the Create Pivot Table dialog.
    11. The MDM Import Manager creates a new table named “table <Pivot>”
    in the data source (where “table” is the name of the original source
    table).
    12. In the drop-down list of source tables, select the newly created pivot
    table on which to perform subsequent import processing.
    Hope that helps ...
    Regards
    Deepak Singh

  • How to do it in pivot..

    Hi experts
    i have one probs....
    My report is having three column : where C=A*B
    A B C
    10 10 100
    5 5 25
    TOTAL 15 15 225
    Now how to get this , when i m doing sum at pivot is is doing sum for Column C and giving 125 instead of 225....so please suggest me how can i achieve it...
    Thanks in advance
    regards
    frnds

    Hi,
    I would like to clarify you some points:
    1. You want to see sum(a)*sum(b) in C... for that your using Grand Total..
    If my understanding is correct... you shoud not go for Grand Total because it does not make any sense implementing in this scenario...
    Grand Total: as label indicates it will SUM UP the values..
    To get your report:
    Do not use Grand Total..
    As my previous explanation, use two unions which will get you to the following:
    A-----B------C
    ========
    1-----1-----1 =====> I Union
    2-----2-----4 =====> I Union
    3-----3-----9 =====> II Union
    If you still want to achieve it (3rd Row) in a Pivot.. I dont think it is possible to implement..
    -Vency

  • How to sum only the positive numbers in a Pivot table when using Power Pivot

    Hi, I have this schema:
    …and this Pivot:
    How do I get this result from PowerPivot.
    If I only use normal Excel Pivot I could use Calculated Field and get the wanted result in a snatch.
    But I guess the problem with using PowerPivot in this scenario is a context or/and a aggregation problem?
    Here is the formula I try to use (I have also tried the FILTER function but couldn’t get it right):
    TRUE DEMAND (Forecast- Stock>0) =
    CALCULATE([TOTAL DIFF (FORECAST-STOCK)],
    [TOTAL DIFF (FORECAST-STOCK)]>0)
    Here is my ExcelFile:
    https://onedrive.live.com/redir?resid=B7906DD091ACC085!357&authkey=!AJN_r_1NCP4thrE&ithint=file%2cxlsx
    Any suggestions?
    Best Regards
    Tommy

    Hi Tommy,
    sorry, a few words are not enough.
    This post does explains it in detail:
    http://sqlblog.com/blogs/marco_russo/archive/2010/01/03/how-calculate-works-in-dax.aspx
    Imke

Maybe you are looking for

  • Setting up the Weblogic portal with Oracle Database

    I am creating weblogic portal domain using oracle database a) At the “configure JDBC Data Source “ I have changed all database sources to oracle and before this I have created the weblogic/weblogic user id and required tables spaces also 1) cgDataSou

  • How to map customer field to standard field using BAPI_PO_CREATE1 ?

    Hi, i am trying to transfer a customer field from SRM to ECC60 through BAPI_PO_CREATE1; In SRM the EAN field does not exist; Thus we have created it. While transfering the PO to ECC, we try tu use BBP_PO_INBOUND_BADI to map the SRM field to the EAN11

  • Perl manipulator Cloning

    Hi friends I am trying to clone the records present in the application using perl manipulator. To the cloned records,I need to add a new property which is a combination of 2 properties,product id and group name.Product id is an existing property and

  • Ipod 5G missing from itunes, freezes with 'do not disconnect'

    my ipod simply cant be seen on itunes and whenever i plug it in, it will freeze with 'do not disconnect' and not able to do a legal,safe removel. hav to remove it illegally and do the 'reset' to clear the 'do not disconnect' message. ipod is still fu

  • I need a plug-in with just the filter section of the exs24?

    Hi guys, is there something available with multiple LFOs? Filter only, no sampler. Thanks Eddie