ADF Pivot Table example
The Pivot table is good for analyzing the data & It is widely used for the analytical purpose. ADF DVT provides the Pivot table capability and it is more powerful compare to ADF table. Using ADF Pivot table, we can do group by columns, transfer Row into Column and Column into Row, Aggregation function, filtering, editable table, sorting, export to excel and much more. Here, we are going to create a Pivot table with three examples.
I have used the following Sales-Table to create Pivot . The Sales-Table has the following data.
Download the sales table DDL : sales.sql
Example1: Find out the total product price purchased by location (Mumbai & Delhi )
1. Create an ADF Fusion Web Application
2. Create an EO & VO object of Sales
3. Create a JSF page. Drop the Sales View from Data Control into the JSF page, Select ADF Pivot Table as shown below
4. As shown in the following image, drag and drop attributes then Click Finish
- Drop ‘Location’ field from Available Attributes => Page Edge
- Drop ‘Sex’ & ‘Product’ from Available Attributes => Row Edge
- Drop ‘Price’ from Available Attributes => Data Labels
5. Once done, give summary to the Pivot
6. Run this page will yield the following result. The Total product price in each location by Male & Female.
Example2: Find out the total price made through Online and Retail?
Create a Pivot Table like below
Right click the below Image and Select Open in New tab for clear view
Result of the above ADF PIVOT TABLE
Example 3: Count the number of products purchased by category (Audio & Video)?
Create the Pivot table like below
Note: Right click on the Image and Select Open in New tab for clear view
Result of the above ADF Pivot Table
We can restructure the PIVOT after it render to the page
The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.
Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
Latest posts by Govind
- JSF Login Logout Form Authentication Example - October 16, 2017
- How to Bookmark URL in JSF using GET method and ViewParam – example - October 14, 2017
- JSF Dynamic Navigation and how to use wildcard in navigation - October 12, 2017