More on the pivot table processing in coherence

hello, all:
I posted a question regarding how to create a pivot table in coherence (coherence and pivot table
Now I am on a project that my mgr wanted me to query a coherence cache and return a subset in "pivot" structure.
Suppose I send a request from the client with these info: String[] rows, String[] columns, String[] data. Each of them represent rows area, columns area and data area as in a Excel table. The aggregation is limited to sum for now.
I managed to create some code like this:
public Map<Object, Object> sum(Filter filter, String properties, String[] targets){
          EntryAggregator[] entryAggregators = new EntryAggregator[targets.length];
          for(int idex = 0;idex<targets.length;idex++){
               entryAggregators[idex] = new DoubleSum(targets[idex]);
          MultiExtractor me = new MultiExtractor(properties);
          EntryAggregator ca = CompositeAggregator.createInstance(entryAggregators);
          GroupAggregator ga = GroupAggregator.createInstance(me,ca);
          return aggregate(filter, ga);
     }here properties represent rows: "getX,getY,getZ" ; targets represent data to aggreated on: targets[] {"getA","getB"}
There are two relevant questions:
1. I am not able to put the columns info into the code;
2. the return type above is Map<Object, Object> , printing map looks like
+{[Parts, Appliance, Trash compactor],[214.5, 1.0]}...+
with 3 rows (X,Y,Z) in the first segment, and aggreated 2 values (A,B) in the 2nd segment.
how can I exact these values from a map structure (it seems the key/value are map themselves), and design a "pivot" structure to host them?
I hope I've made myself clear.
Thanks,
Johnny

Hi Johnny,
Your question intrigued me so I thought I would do a bit of digging into how you might replicate a pivot table using aggregators. Well, it has taken me a few days and as it is quit a long subject I wrote it up on my blog rather than post it all in the forum http://thegridman.com/coherence/oracle-coherence-pivot-table-queries/
You were on the right track with the GroupAggregator but there is a bit more to do to allow all the different combinations of rows, columns and values as well as filtering.
I hope what I have written up is clear enough, just ask if you have more question.
JK

Similar Messages

  • Average of the Grand Total in the Pivot Table

    all,
    I have calculated a Grand Total of sum 3 days trade in the pivot table using the Totals after in the Pivot table. I wanted to obtain the average of this Grand total. How can i achecive this in OBIEE 10g.? Please help urgent

    I did not understand your scenario exactly. Did you try using the 'newly calculated column' option from 'More options' of the particular column for which you want the average?.
    for example
    segment brand 1 value
    brand 2 value
    brand 3 value
    brand 4 value
    Avg brand per segment <value>
    notice that the 'Avg brand per segment' is a 'newly calculated item' where the average brand has been calculated. hope this helps.

  • Updating pie graph  with the pivot table data.

    Hi:
    I have two components, the first is a pivot table and second
    of them is the pie graph, the two components were created in JDeveloper 11g
    on the same page through the same view object, this view object was created through
    a query.
    I need to update the pie graph through the pivot table data.
    ie, according to the data containing on the pivot table, to update the pie graph.

    Hi,
    BPM can be used to validate and update tables.  You can have a transformation step in BPM to validate, and either a JDBC or RFC adapter to update XI table...depending on if the table is an ABAP table or table create outside of ABAP using the vendor's dba tools.
    As for sending file based on counter or timestamp in the name, you can develop a simple adapter user-module using java which can retrieve the file name(s) being processed.  If the name satisfy the rules you have, then proceed, or else terminate the processing in the adapter.
    Regards,
    Bill

  • Leading zeros are not carried from the pivot table to exported Excel (9927815)

    Hello All -
    I am just wondering if there is a fix available for -- Leading zeros are not carried from the pivot table to exported Excel (9927815)
    can anybody suggest when it will be fixed and if there is any-workaround for this issue if there is no fix available.
    Thanks
    Ram

    Thanks Timo -
    Studio Edition Version 11.1.1.2.0
    About
    Oracle JDeveloper 11g Release 1 11.1.1.2.0
    Studio Edition Version 11.1.1.2.0
    Build JDEVADF_11.1.1.2.0_GENERIC_091029.2229.5536
    Copyright © 1997, 2009 Oracle and/or its affiliates. All rights reserved.
    IDE Version: 11.1.1.2.36.55.36
    Product ID: oracle.jdeveloper
    Product Version: 11.1.1.2.36.55.36
    I will check on support.oracle.com

  • Measure Values are not shown in the pivot tables

    Measures without aggregation (in rpd) are not shown in pivot table.
    Im trying to add multiple columns in the fact table as measures,one which is summable had has the SUM function and three which are not summable.
    The initial report will be as follows and I have been able to get the data displayed.
    Year | Month| Company Name| SUM(C1)| C2|C3
    However if I pivot the table as follows data in column C2 and C3 are not Displayed.
    Columns
         Year     
              Month     
              Company     
    Rows                    
    Measure Lablel                    
    Measures
         SUM(C1)     
                   C2     
                   C3                    
    Should we have an aggregation rule applued in C2 and C3 ?

    Yes, all the column entries must have agg rule. You can specify one such as 'first' in the pivot table.

  • How we will know that dimension size is more than the fact table size?

    how we will know that dimension size is more than the fact table size?

    Hi,
    Let us assume that we are going to take Division and distribution channel in a dimension and assume we have 20 distinct values for Division in R/3 and 30 Distinct values for Distribution channel .So Maximum, we can get 20 * 30 records in dimension table and we can take rough estimation of records in the cube by observing the raw data in source system.
    With rgds,
    Anil Kumar Sharma .P

  • Power Pivot Slicer options not showing in the Pivot Table Field list

    Excel 2013. In all the tutorials I watch when you create a Pivot Table using Power Pivot there are Slicer options in the
    Pivot Table Fields list.  Slicer Horizontal, Slicer Vertical These do not show for me.   I see Filters, Value, Row, Column only.   Is there a setting I need to turn on?   When I click on PowerPivot
    at the top, the first icon on the bar is Manage Data model, not Powerpivot as I have seen on some of the youtube tutorials.   Thank you in advance.

    Thank you for trying but it's not what I am after.  I understand how to use Slicers with pivot tables.   My question relates to Pivot Tables created using PowerPivot.   Directly under the Pivot Fields list on the right is a section where
    you choose what you want to pivot  i.e  Filters, Values, Rows, Columns.   These are standard with any pivot table.  When I watch videos on PowerPivot there are 2 additional options in the section.  Slicer Vertical, Slicers Horizontal.
     The video comments  they only show in when creating a pivot table using PowerPivot.  These 2 options are not there for me.  I don't know why. It maybe the version of office I am using which is Microsoft Office Plus 2013. I'd like them
    included.  Appreciate you taking the time to help.  

  • Update to power query does not refresh the pivot table

    Hello all,
    whenever i make a change to power query dataset and do a refresh, the data will not be refreshed on the pivot table build on the power query dataset.
    Is there anything which i missed while updating the powerquery?
    Thanks
    Satya

    I have created the Powerquery dataset and loaded it into Data model. Then i have created the pivot table using the external connection.
    After making changes to dataset and then loaded the dataset to Data model. After these changes, once I click on the refresh pivot table or refresh all from data tab nothing changes on the pivot tables.
    Thanks
    Satya

  • DATESYTD (or any Time Intelligent Function) Working Off Other Data Besides Date in the Pivot Table

    I am working on a project where I need to count the number of events from the start of the year to the end for each year in the data with each event counting the current event and any previous events sequentially.  My results should look like the following:
    MarketNameDate
    MarketCount
    2012-09-11|Kansas City
    1
    2012-09-18|Denver
    2
    2012-09-25|Chicago
    3
    2012-10-02|Seattle
    4
    2012-10-09|Phoenix
    5
    2012-10-16|Tampa
    6
    2012-10-23|Norfolk
    7
    2012-10-30|Alexandria
    8
    2012-11-06|San Jose
    9
    2012-11-27|Dallas
    10
    2012-12-04|Fort Lauderdale
    11
    2013-01-15|Los Angeles
    1
    2013-01-22|Orange County
    2
    My formula is as follows :=calculate(distinctcount(Event_Table[MarketNameDate]),datesytd(dates_dimensions[date_value]),all(dates_dimensions)).  This formula works correctly when I am using the Date_Dim table to drive the analysis in the Row Label or
    Column Label in my Pivot Table.  My events table is connected directly to Date_Dim table and I would like to use the [MarketNameDate] field instead. 
    I need to get a rolling count of the number of markets through the year, but roll up on [MarketNameDate] instead of anything out of Date_Dim.  Is this possible or do the Time Intelligence functions require you to only use Date_Dim columns as Row Label
    or Column Label in my Pivot Table.
    I would also be happy to have an alternative way of solving the problem if there is a way to do it.
    Here is an approximation of the data I am using.
    Seminar_Events
    Event_Type
    Market
    MarketNameDate
    MarketMinDate
    Preview
    Kansas City
    2012-09-11|Kansas City
    9/11/2012 0:00
    Workshop
    Kansas City
    2012-09-11|Kansas City
    9/11/2012 0:00
    Preview
    Denver
    2012-09-18|Denver
    9/18/2012 0:00
    Workshop
    Denver
    2012-09-18|Denver
    9/18/2012 0:00
    Preview
    Chicago
    2012-09-25|Chicago
    9/25/2012 0:00
    Workshop
    Chicago
    2012-09-25|Chicago
    9/25/2012 0:00
    Preview
    Seattle
    2012-10-02|Seattle
    10/2/2012 0:00
    Workshop
    Seattle
    2012-10-02|Seattle
    10/2/2012 0:00
    Preview
    Phoenix
    2012-10-09|Phoenix
    10/9/2012 0:00
    Workshop
    Phoenix
    2012-10-09|Phoenix
    10/9/2012 0:00
    Preview
    Tampa
    2012-10-16|Tampa
    10/16/2012 0:00
    Workshop
    Tampa
    2012-10-16|Tampa
    10/16/2012 0:00
    Preview
    Norfolk
    2012-10-23|Norfolk
    10/23/2012 0:00
    Workshop
    Norfolk
    2012-10-23|Norfolk
    10/23/2012 0:00
    Preview
    Alexandria
    2012-10-30|Alexandria
    10/30/2012 0:00
    Workshop
    Alexandria
    2012-10-30|Alexandria
    10/30/2012 0:00
    Preview
    San Jose
    2012-11-06|San Jose
    11/6/2012 0:00
    Workshop
    San Jose
    2012-11-06|San Jose
    11/6/2012 0:00
    Preview
    Dallas
    2012-11-27|Dallas
    11/27/2012 0:00
    Workshop
    Dallas
    2012-11-27|Dallas
    11/27/2012 0:00
    Preview
    Fort Lauderdale
    2012-12-04|Fort Lauderdale
    12/4/2012 0:00
    Workshop
    Fort Lauderdale
    2012-12-04|Fort Lauderdale
    12/4/2012 0:00
    Preview
    Los Angeles
    2013-01-15|Los Angeles
    1/15/2013 0:00
    Workshop
    Los Angeles
    2013-01-15|Los Angeles
    1/15/2013 0:00
    Preview
    Orange County
    2013-01-22|Orange County
    1/22/2013 0:00
    Date_Dimensions
    date_value
    1/1/2012 0:00
    1/2/2012 0:00
    1/3/2012 0:00
    1/4/2012 0:00
    1/5/2012 0:00
    ETC
    There is a relationship created between Date_Dimensions[Date_Value] and Seminar_Events[MarketDateName]
    Any help would be very much appreciated.
    Kind Regards,
    John

    If you want a running count on MarketNameDate, you need to create a numeric ranking of that column in a new calculated column in your Events table.
    Something like:
    Rank = RANKX(ALL(Events), [MarketNameDate], ,1)
    You should also add a year calculated column in that table:
    Year = YEAR([MarketMinDate])
    Once those are in place, this measure should work for you:
    MarketCount:=
    CALCULATE(
    DISTINCTCOUNT(
    Events[MarketNameDate]
    FILTER(
    ALL(Events),
    Events[Rank] <= MAX(Events[Rank])
    && Events[Year] = MAX(Events[Year])
    Mike, can you check out this thread?
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/a2e22d61-7c32-43f2-900e-d9d6325fa26d/needed-more-answerers?forum=sqlkjpowerpivotforexcel
    Thanks!
    Ed Price, Power BI & SQL Server Customer Program Manager (Blog,
    Small Basic,
    Wiki Ninjas,
    Wiki)
    Answer an interesting question?
    Create a wiki article about it!

  • Problem with the Pivote Table order by Clause in OBIEE report

    Hello All,
    Can anyone help?
    I am developing a report with 3 columns
    1. Year
    2. Customer name
    3. Amount
    I need Year in Ascending & Amount Descending (Group by Year and then Desc by amount)
    In Table view data is displayed correctly, but in Pivote Table it’s not sorting correctly
    Table View ( This is correct)
    Year     Customer Name     Amount
    2009,     a1,     260,000.00
         a2,     152,030.00
         a3,     20,000.00
    2008,     a6,     193,080.00
    2004,     a7,     860.2
         a8,     114.7
    2003,     a9,     200,243,813.40
         a10,     91,351,364.10
    Pivote Table Results as follows:
    Year     Customer Name     Amount
    2009,     a1,     260,000.00
         a2,     152,030.00
         a3,     20,000.00
    2008,     a6,     193,080.00
    2004,     a7,     860.2
         a8,     114.7
    2003,     x,     26,374,818.00
    y, ....................
    a9, 200,243,813.40
    For year 2003 in place of 'x' value a9 value has to be shown........
    Regards,
    SMA

    Your post doesn't help a lot. Why it's still not solved ?
    If it's caused by the ascendant order, the only way that you have is to pivot your table :
    http://gerardnico.com/wiki/dat/obiee/presentation_service/obiee_transformation_table_to_pivot
    And then you can set all sort that you want.
    success
    Nico

  • Record count is more in the Fact tables when compared to Cube data!

    When i delete request from my cube it is not getting deleted from the fact table. Cube shows around 3.5 million records but when I checked in the fact table it was showing more than 11 million records.

    Hi Kingsley,
       You may try this approach.
       1. Use TCode listschema
       2. Select the type of cube abd give the cube name as well.
       3. This will display the table sinvolved in the cube(star schema).
       4. Select the Ftable listed there and see the number of rows in it.
       Inorder to delete the entire data from cube, you may need to delete all the load requests that has happened before as well.
       Hope this helps...
    Thanks,
    Raj

  • Some of the pivot table header column not center-aligned

    I've dragged a pivot table model from Data Controls. The generated pivot table on page does not display some of the header columns center-aligned. I tried to set a css style in HeaderFormat listener for the columns, but it did not work. I checked the html source code and found the problem was caused by "colspan" not created properly. I'd like to know how pivot table header columns are created, anyone who knows please kindly give some tips,thanks!

    Try setting the Header Row to allow to repeat. I've had to set that Repeat option to get things to break over pages correctly.
    Ryan D. Lunka
    Cardinal Solutions Group
    [email protected]

  • Downlaoding the Pivot table in PDF problem

    Hi Gurus,
    I have one pivot table with almost 40 columns. When I tried to download the dashboard into PDF, it is giving blank PDF. Can any one suggest me how to trouble shoot this problem.
    Thanks
    V

    No. of columns in your report is too high here for your report to be downloaded in PDF. 100 % a blank PDF will be shown. The only way to get rid of this issue is to either create a duplicate report & reduce the no. of columns to just important columns in this duplicate report OR play with width size here. Playing with width will def distort your PDF ...So, try to make your business understand the functionality of OBIEE here.
    Hope this helps

  • In Excel 2010, can you have a pivot table pull the actual text that is in your worksheet?

    Hello there,
    In other words, I have two worksheets in the same workbook and the column titles are the same in each.  They both include columns such as Ticket Number, Description, PM Update, Dev Review, Account Update, Client Review, Client Approval. I need to indicate
    the following in the pivot table...
    PM Update, Dev Review, Account Update, Client Review - This needs to show either In Progress, Complete or it should be blank if neither.
    Client Approval needs to show Yes or blank
    Ticket number needs to show the actual ticket number (which is alpha-numeric) that's displayed in the worksheet. Currently I have this setup as the first column in the worksheets so it is displaying properly.
    Description needs to show the actual description that is displayed in the worksheet
    Is this possible??  I've been working on trying to do this for quite a while. Please, please help.
    Thanks so much in advance!
    -Lori

    Hello Lori,
    I think that is possible :) one question - you want to merge those two worksheets into one pivottable report? That would be little more complicated.
    If not, just try to put all your wanted columns into pivottable "row field" part - Excel won't treat the data as a calculation and will just display according to outline. One nice tip - you can always change the report layout from "compact
    form" into "tabular form" (using - PivotTable Tools/Design/Report Layout). That would display the data in separate columns so you can filter easily.
    Let me know, if it works :)
    Milan

  • How to export the created Pivot table by using Power Pivot into separate excel file in the same format?

    Hi PowerPivot experts,
    I have created more than 60 pivot tables in multiple sheets by using PowerPivot work book. now i want delivery all the pivot table in excel document to my end user by email.
    I want send only the Pivot tables which i created using PowerPivot data model instead of sending the whole model file since its very heavy.
    I have tried with export option in Excel 97-2003, its works fine but not getting exact pivot format which i created and its displays as value.
    My aim to send pivot table that i created format but not whole file with source data.
    I would be really grateful if advise me to fix it out.

    Hi Robert,
    I don't think it is a good idea to deliver all PivotTable report to end user via E-mail, and SQL Server PowerPivot for Excel doesn't support to deliver PivotTable report to end user without PowerPivot data inside in the data model. For example, I suppose
    we create a PivotTable to display the SalesAmount of US in pervious years(eg:2012, 2013, 2014), how can we dynamic show the value based on end user selection without PowerPivot data model data(The PivotTable report don't have data source)?
    So, one workaround that we can create a shared folder to store all of PowerPivot report for all of end user in the domain environment, and then inform end users to copy the PowerPivot reports what they want via E-mail.
    If the end users aren't in domain environment, we can implement the VPN soltion to achieve this.
    Regards,
    Elvis Long
    TechNet Community Support

Maybe you are looking for