CenterView Help
How To: Create Pivot Views
Sometimes the user may wish to reorganise and summarise data in a stream set to get a desired report. The pivot view functionality allows the user to use a stream view attribute's values as the rows against which all other data is reported.
All examples on this page are based on the stream data shown in Figure 1.
Figure 1: Raw stream set data
Table of Contents
Example 1: Basic Pivot View
These instructions describe how to configure a view to look like Figure 2. The view shows the total 'Random_Number' value per 'Random_Date' and 'Status' value.
Figure 2: 007_Pivot_View1
Step-by-step guide
- Open the stream configuration.
- Go to the Views tab.
- Create a new view. Choose the 'Pivot' option.
- Give the view a name. In this example, the view has been named 007_Pivot_View1.
- Leave the Pivot Column Source as 'View Data'.
- Drag the 'Random Date' attribute from the left hand list into the Row Attribute field.
- Drag the 'Status' attribute from the left hand list into the Column Attribute field.
Drag the 'Random Number' attribute from the left hand list into the Value Attribute field. It will set the aggregate attribute to Sum() by default.
Figure 3: View configuration for 007_Pivot_View1
- Save the view.
- If you now open the view, it should look like Figure 2.
Example 2: Adding a Total Column to the Basic Pivot View
These instructions describe how to configure a view to look like Figure 4. The view shows the total 'Random_Number' value per 'Random_Date' and 'Status' value. It also shows the total 'Random_Number' value per 'Random_Date'.
Figure 4: 007_Pivot_View2
Step-by-step guide
- Open the stream configuration.
- Go to the Views tab.
- Create a new view. Choose the 'Pivot' option.
- Give the view a name. In this example, the view has been named 007_Pivot_View2.
- Leave the Pivot Column Source as 'View Data'.
- Drag the 'Random Date' attribute from the left hand list into the Row Attribute field.
- Drag the 'Status' attribute from the left hand list into the Column Attribute field.
Drag the 'Random Number' attribute from the left hand list into the Value Attribute field. It will set the aggregate attribute to Sum() by default.
Drag the 'Random Number' attribute from the left hand list into the Total Attribute field. It will set the aggregate attribute to Sum() by default.
Figure 5: View configuration for 007_Pivot_View2
- Save the view.
- If you now open the view, it should look like Figure 4.
Example 3: Multiple row attributes
These instructions describe how to configure a view to look like Figure 6 . The view shows the total 'Random_Number' value per 'Random_Date' per 'Status' and 'Even_CV_ID' value. It also shows the total 'Random_Number' value per 'Status' and 'Even_CV-ID' value.
Figure 6: 007_Pivot_View3
Step-by-step guide
- Open the stream configuration.
- Go to the Views tab.
- Create a new view. Choose the 'Pivot' option.
- Give the view a name. In this example, the view has been named 007_Pivot_View3.
Leave the Pivot Column Source as 'View Data'.
- Drag the 'Status' attribute from the left hand list into the Row Attribute field.
- Drag the 'Even_CV_ID' attribute from the left hand list into the Row Attribute field.
- Drag the 'Random Date' attribute from the left hand list into the Column Attribute field.
Drag the 'Random Number' attribute from the left hand list into the Value Attribute field. It will set the aggregate attribute to Sum() by default.
Drag the 'Random Number' attribute from the left hand list into the Total Attribute field. It will set the aggregate attribute to Sum() by default.
Figure 7: View configuration for 007_Pivot_View3
- Save the view.
If you now open the view, it should look like Figure 6.
Example 4: Using different aggregate functions and formatting fields
These instructions describe how to configure a view to look like Figure 8 . The view shows the maximum 'Random_Number' value per 'Status' and 'Random_Date' value. It also shows the maximum 'Random_Number' value per 'Status'. The format of 'Random_Date' has been amended from the original stream set format.
Figure 8: 007_Pivot_View4
Step-by-step guide
- Open the stream configuration.
- Go to the Views tab.
- Create a new view. Choose the 'Pivot' option.
- Give the view a name. In this example, the view has been named 007_Pivot_View4.
- Leave the Pivot Column Source as 'View Data'.
- Drag the 'Status' attribute from the left hand list into the Row Attribute field.
- Drag the 'Random Date' attribute from the left hand list into the Column Attribute field.
Drag the 'Random Number' attribute from the left hand list into the Value Attribute field. It will set the aggregate attribute to Sum() by default.
- Double click Sum(Random_Number) in the Value Attribute field.
- Change the aggregate function to Maximum.
Drag the 'Random Number' attribute from the left hand list into the Total Attribute field. It will set the aggregate attribute to Sum() by default.
- Double click Sum(Random_Number)->Total in the Total Attribute field.
Change the aggregate function to Maximum.
Figure 9: View configuration for 007_Pivot_View4
- Double click on Random_Date in the Column Attribute field.
Change the Date/Time Format to yy-MMM-dd.
Figure 10: View Attribute Configuration for Random_Date
- Save the view.
If you now open the view, it should look like Figure 8.
Example 5: Using the maximum pivot columns field
Step-by-step guide
- Open the stream configuration.
Model Ref: 007
Related articles
Filter by label
There are no items with the selected labels at this time.
Please let us know if we could improve this page feedback@phixflow.com