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

Similar Messages

  • Pivot table group by is not working

    Hi Gurus,
    I am using OBIEE 10g
    I have Dimension and Fact table. In fact table i have some measures and which are calculated and some are aggregated functions. The Geo dimension has Division, region and Market.
    In pivot table when i am grouping the values based on the Division & grand total the aggregate columns are showing the value proper where as the calculated columns gives wrong values.
    Example : Measure1 : Sum(tickets), Measure 2: Sum(repeat ticket), Measure 3: sum(repeat ticket) / Sum(ticktets)
    When i am grouping based on Division, i am getting the proper values for Measure 1 and measure 2 where as measure 3 is giving me different value or some time a region value.
    I am not able to figure out where grouping total will be done. i checked the log file it has the simple SQL query, but i dont no where it groups the data.
    Please help me its Urgent.
    Regards
    Ali

    Hi Deepak,
    Thanks for taking time and seeing my query.
    In Pivot table i am using the diemnsions are Division and Region. When i am making the total of based on Division it is taking random region values and stamping on the total of division where as grand total is giving correct value. In below example Measure1 and Measure 2 is Sum( Measure1), Sum(Measure 2) where as Measure 3 is Weigted average of Sum(Measure2) / Sum(Measure1). It is giving the value correct for indivual regions where as the division total is getting worng.
    Example :
    Division Region Measure1 Measure 2 Measure3
    Northeast NY 100 50 .5
    Northeast NJ 50 25 .5
    Northeast CI 100 25 0.25
    Northeast total :   250          100        .4
    i want the above value but i am getting like this
    Division Region Measure1 Measure 2 Measure3
    Northeast NY 100 50 .5
    Northeast NJ 50 25 .5
    Northeast CI 100 25 0.25
    Northeast total :   250          100       .5
    Let me know if you need any further information.

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

  • Help Needed regarding to Table View Control

    Hi Abapers
    In Table View Control which property or system variable keeps the user selected row's row id.
    Situation is that user enters many records into sales details table view. Table view contains the fields, productid product no qty discount and rate. Suppose user wants to delete one particular record(sales details) from that table view while entering this sales details .here i want to know which is that particular row that the user selected. Table views which property keeps this row no information. i am very glad if you people give me more information abount table View Controls .
    With regards
    Anoop.

    Hello Anoop,
    post your questions in the correct forums and you can hope to get a better answer. This forum as you see is the suggestions and comments forum and not the ABAP forum.
    Sameer

  • Unable to group with page breaks when creating pivot table in BIP

    Hi,
    I'm using BIP 10.1.3.4 and I need some assistance with report with pivot tables. I used the wizard to successfully create the pivot table but i need to add a group and break the page on that group. Is there any way i can do this?
    Thanks.

    HI Bala,
    I am Durgaprasad from Pune-INDIA, working as a OBIEE developer, I have one query which I mentioned below can you please go threw it.
    I have done migration Discoverer Admin EUL Layer into OBIEE repository using below methodology.
    Navigate to the <installdrive>\OracleBI\server\Bin directory. There are two important files in this directory: the migration assistant executable file named MigrateEUL.exe and a properties configuration file named MigrationConfig.properties.
    Could you please help me how to migrate discoverer plus workbooks and worksheets into OBIEE Answers?
    go through below link, It will show navigation steps for migrating of EUL from Discoverer to OBIEE.But i need migration of workbooks and worksheets from Discoverer into OBIEE Answers.
    http://www.oracle.com/technology/obe/obe_bi/discoverer/discoverer_1012/discomigration/migrate_disco_biee.htm
    This is very great full help to me …
    Advance thanks for your suggestions.
    Regards
    Duraga Prasad.

  • Limit a Pivot Table filter to just one group (Excel 2010)

    I use Excel 2010 and want to apply a filter to just one group of data within a Pivot Table.
    It appears that filters are applied to the entire Pivot table; is there a way to limit the scope of a filter so it is applied to just a single group of data (grouped using the group function within a Pivot). Alternatively could I apply a filter to just a
    selection of rows within the Pivot?
    I have tried breaking my pivot into separate tables and applying the filters individually but the tables interfere with each other when expanded/collapsed and generate the Excel "overlapping tables" error message.
    Any suggestions gratefully received.
    Regards
    Pete

    just use filter is no possible that apply a filter to one group. maybe slicers is a good choose.
    http://office.microsoft.com/en-us/excel-help/use-slicers-to-filter-pivottable-data-HA010359466.aspx
    KR

  • 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

  • TSQL query to calculate Count / Sum grouping by date on a Pivot Table

    Hi All
    I need help to group the pivot table output to group by dates and sum/count the values. I have a table like shown below.
    Date
    Student 
    Subject
    Hunt
    Marks
    18/02/2014
    Sam 
    Maths
    1
    20
    18/02/2014
    Sam 
    Maths
    1
    10
    18/02/2014
    Sam 
    Maths
    2
    30
    18/02/2014
    Luke
    Science
    1
    50
    17/02/2014
    Sam 
    Maths
    2
    50
    17/02/2014
    Luke
    Science
    2
    60
    16/02/2014
    Luke
    Science
    2
    20
    16/02/2014
    Luke
    Science
    3
    20
    I want to Group by dates and move the Hunt to columns calculating their counts and sum their marks too. Like given below.
    I wrote a pivot query like below but If i group it with dates and calculate the total marks it throws aggregate errors.
    Create Table Student_Log ([Date] datetime ,Student varchar (20), Subject varchar (20) ,Hunt int ,Marks int )
    Go
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','10')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','2','30')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Luke','Science','1','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Sam ','Maths','2','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Luke','Science','2','60')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','2','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','3','20')
    Go
    select * from Student_Log
    select [DATE] , [Student], [Subject] ,[1],[2],[3],[4],Total =([1]+[2]+[3]+[4])
    from
    ( select [Date], [Student], [Subject],[Hunt],[Marks] from Student_Log
    )x
    pivot
    count ( [Hunt]) for [Hunt]
    in ([1],[2],[3],[4])
    )p
    order by [Date] desc
    I have done this far only. More than this I need to enhance it with the Percentage of Hunts for each Student.
    ie like below table.
    On 18th Sam in Maths he had 2 rows on 1st hunt  and 1 row on 2nd hunt. So On the Pivot table is it possible to represent it on percentage using the Total Attempts column.
    Thanks a lot in advance.
    Its runnung in SQL 2000 Server.

    Create Table Student_Log ([Date] datetime ,Student varchar (20), Subject varchar (20) ,Hunt int ,Marks int )
    Go
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','1','10')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Sam ','Maths','2','30')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-18 15:00:00.000','Luke','Science','1','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Sam ','Maths','2','50')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-17 15:00:00.000','Luke','Science','2','60')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','2','20')
    INSERT INTO Student_Log ([Date],Student, [Subject],Hunt,Marks) VALUES('2014-02-16 15:00:00.000','Luke','Science','3','20')
    Go
    select * from Student_Log
    ;with mycte as
    Select [Date], [Student], [Subject] ,
    Count(CASE WHEN [Hunt]=1 Then Hunt End) as Hunt1,
    Count(CASE WHEN [Hunt]=2 Then Hunt End) as Hunt2,
    Count(CASE WHEN [Hunt]=3 Then Hunt End) as Hunt3,
    Count(CASE WHEN [Hunt]=4 Then Hunt End) as Hunt4,
    Count(CASE WHEN [Hunt]=1 Then Hunt End)
    +Count(CASE WHEN [Hunt]=2 Then Hunt End)
    +Count(CASE WHEN [Hunt]=3 Then Hunt End)+
    +Count(CASE WHEN [Hunt]=4 Then Hunt End) as Total,
    ISNULL(SUM(CASE WHEN [Hunt]=1 Then Marks End),0) as Mark1,
    ISNULL(SUM(CASE WHEN [Hunt]=2 Then Marks End),0) as Mark2,
    ISNULL(SUM(CASE WHEN [Hunt]=3 Then Marks End),0) as Mark3,
    ISNULL(SUM(CASE WHEN [Hunt]=4 Then Marks End),0) as Mark4
    from Student_Log
    Group By [Date], [Student], [Subject]
    Select [Date], [Student], [Subject]
    , Cast(Hunt1*1./Total*100 as int) as [1]
    , Cast(Hunt2*1./Total*100 as int) as [2]
    ,Cast(Hunt3*1./Total*100 as int) as [3]
    ,Cast(Hunt4*1./Total*100 as int) as [4]
    ,Total,Marks=( Mark1+Mark2+Mark3+Mark4)
    from mycte
    order by [Date] DESC, Student desc
    drop table Student_Log

  • 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
    John

    I 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'

  • Required Help in Pivot Table

    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 Usman

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

  • Advanced filtering/grouping question (pivot-table?)

    Ahoy. I have come across a few flies in the final varnish of an image database I'm working on. I don't yet know the best way to ask the question. I think what I am looking for is some kind of pivot-table like grouping capability. I think I could do this with nest-able Smart Albums -- but you can't nest Smart Albums in Aperture. (Journler, for those who used it, had, imho, a brilliant implementation of nest-able filters.)
    Let me give what should be able to serve as a good generic example: a Library of dog images. These are organized into Projects based on shoots. The images are keyworded with the dogs' breeds, their type, their coat type and color, their individual names (when known), and other "normal" dog characteristics (gender, age when known, etc.). There are also some special keywords, such as a set for expressions (Relaxed, Angry, Teeth Bared, Questioning, Attentive), and, where needed, details of ailments (Sore, Rash, Teeth, Gums, Wound).
    I have set up Smart Albums to show many of these, e.g.:
    . Spaniels
    . Huskies
    . Retrievers
    . Cocker Spaniels
    . Labrado Retrievers
    . Details of Angry expressions
    etc.
    The database problem I am trying to resolve is: how best to narrow selections of groups of Smart Albums? Using the example above, for instance, I have Smart Albums to show me all the detail images of expressions:
    . Dog is Angry
    . Dog is Attentive
    . Dog is Asleep
    . Dog is Tired
    . Dog is Questioning
    . Dog is Relaxed
    How best to narrow those to, for instance, just Huskies? or just Working Dogs? or just the individual dog known as "Nanook's Shadow"?
    Clearly, if each of those is a keyword (or a keyword container), I can simply add the keyword to the Filter. But I want much greater functionality than that.
    By "best" I mean to include the ability to change the variable -- to chose not just "Huskies", but also "Retrievers", and not just "Working Dogs" but also "Hounds". And I want to change this at once -- not individually for each Smart Album.
    What I've come with is clever and borders on elegant (imho - ), but remains a kludge.
    Smart Albums can be subordinate to only Projects and Folders. Subordinating them to Projects does me some, but little, good. (Subordinating them to other Smart Albums, or to regular Albums, would do me more good, but is not allowed.) I therefore created a new parent Folder for each set of Smart Albums I wanted to be able to readily filter as a group, and copied a set of Smart Albums into it. I then set each Smart Album's "Source" to the containing Folder rather than to "Library". At this point, the Smart Albums show no images, which is good. Now, all I have to do is create an Album of images I want the Smart Albums to operate on, and drag that Album into the containing Folder. So I go to my "Hounds" Smart Album, select all images, create new Album with selected images, and drag that into my Folder "Dog Expressions". The Album filters the universe of my Library to just "Hounds" and the Smart Folders filter from that narrowed group.
    This is relatively flexible: If I want to include "Retrievers" as well as "Hounds", I just make another Album and drag it into the "Dog Expressions" Folder. If I want to see only Retrievers, I drag the "Hounds" Album out of the "Dog Expressions" Folder. (So I made a holder Folder called "Sets for Smart Albums" and I keep Albums such as "Retrievers" and "Hounds" there.) I now have a relatively supple drag-and-drop method of filtering groups of Smart Albums all at once.
    But you can already see the problems. First among them is that the Albums are static. I will need to create new Albums in order to include any new images or Versions or whenever I get around to keywording, etc.
    Still with me? Can you help me do better?
    Is there any reason one couldn't have a pivot table based on metadata? One which not only filters but also groups, so that I could have a view showing (for instance) details of Huskies expressions grouped by expression?
    Thanks in advance. If this catches you on Friday, enjoy the weekend.
    Message was edited by: Kirby Krieger

    LOL. Thanks for the laugh -- the slideshows part is especially funny. Are you Aperture certified yet? The test has no surprises at all. It is very well done (exemplary for on-line testing, imho) and covers all parts that it says it will.

  • Need help on Pivot Table

    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,
    Naresh

    Place measure lables in the rows and year column in column and all the measures in measures

  • Help in Pivot Table

    Hi
    How to show grand total two times in pivot table?is it possible
    Thanks in Advance

    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 Ayres

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

  • Group by problem at pivot table

    Hi,
    firstly i am making a table, everything is ok,
    after i click pivot table, st_desc column writes same value again, i couldnt understand the reason.
    please check my screen shots below,
    http://www.odilibrary.com/index.php/oracle-data-integrator/99-group-by-problem
    kindly advise please

    that my fault
    there is a null at the beginning of the value, they are different,
    sorry

Maybe you are looking for