Posted on

Getting Started with Pentaho Community Edition Dashboard Editor (CDE)

Using the OLAP Chart Wizard to create a bar chart

The easiest way to create a chart is by using the OLAP Chart Wizard. From the Data Sources Panel, open the Wizards group and then click on the OLAP Chart Wizard


Note that this screen will look a bit different when using the Pentaho 6.x versions. Also it has been reported that in Pentaho versions 8.0 and 8.1, the OLAP Chart Wizard may freeze up. If this happens, just skip this part of the tutorial and go on to the next part that covers manually creating a chart. Then you can return to this portion of the tutorial and use the manual approach to create this chart.

Select the Steel Wheels Catalog. This is a sample data source that is included in most Pentaho BA Server versions.

Note: If the Steel Wheels catalog does not appear, check the Pentaho Log in the Java window. If you receive an error such as: ERROR [AbstractOlapUtils] Failed to get valid connection    or    ERROR [AbstractOlapUtils] Invalid Connection. If so, check in the biserver-ce/pentaho-solutions/system/default-content folder for two files named plugin-samples.zip and samples.zip. These file names may have a date and time embedded in the file name such as samples.zip.201511201845. If so, shut down the Pentaho BA Server, rename these files without the date and time extensions (so the files end in .zip). Remove any files from these log folders: biserver-ce/tomcat/temp, biserver-ce/tomcat/logs and biserver-ce/tomcat/work. Then re-start Pentaho BA server.

The SteelWheelsSales cube should automatically be selected. The available Dimensions and Measures should appear automatically in the panels below. Under the Dimensions heading, open up the Product dimension. Drag the Line attribute over and drop it on the Rows: section:

Open up the Time dimension and drag the Years selection to drop on the Columns: area

The Sales Measure should already be highlighted (if not, click on it now).

The bar chart should preview as shown above. If for some reason the chart wizard freezes up at this point (e.g., Pentaho version 8.x), skip this part of the tutorial and go on to the next section.

Give the chart a name “ProdLineSalesByYear”. It is important that whatever name is given, it does not contain spaces or punctuation other than underscore.

Add a title: “Sales by Product Line and Year”. Assign the chart to the HTML Object: Panel_1. As a reminder, Panel_1 was created when we applied the three-panel layout template.

Pentaho version 6 has a slightly different OLAP Wizard screen. There is no prompt for a title in the wizard but this can be changed in the Components panel later on.

When completed with all of the settings, click the OK button. Notice that the OLAP Wizard does the following things. First it creates a Query (named ProdLineSalesByYearQuery) against the data source chosen. In this case, because the source was Mondrian multi-dimensional database, the query language is MDX (click here for details on Mondrian MDX).

select NON EMPTY({Descendants([Product].[All Products] ,[Product].[Line])}) on ROWS, 
       NON EMPTY({Descendants([Time].[All Years] ,[Time].[Years])}) on Columns 
from [SteelWheelsSales]

Return to the Components Panel to view the new chart that has been created by the Wizard:

There appears to be a bug in the Wizard where the Name supplied in the wizard is assigned to the Title property by mistake.

Save the dashboard (click on the Save menu item) and preview:

If the chart does not fit within the boundaries of the Panel, return to the Component view and change the Height and Width parameters (in pixels) so that the chart fits within the Panel.

In the next section a chart will be created manually.