For the complete documentation index, see llms.txt. This page is also available as Markdown.

Carrier Dashboard

Wireless Carrier dashboard ..

Workshop - Carrier Dashboard

Wireless Carrier Dashboard

Before we begin our dashboard journey, we need to understand our OLAP Mondrian datasource.

baseline_demo database
  1. Log into the Postgres baseline_demo database.

The baseline_demo database has a number of key features:

• Centralized Fact Tables

• Dimension Tables (sometimes called lookup tables)

• Simple Join Paths

• Denormalized Structure

• Query Optimization Features

These tables have been 'mapped' using Pentaho Schema Workbench.

  1. Start Schema Workbench.

  1. Open: Workshop--Ctools/Carrier/schema/Wireless carrier.mondrian.xml

  2. Expand: Retail Sales & Call Corridor cubes - our datasources.

Wireless Carrier Mondrian Schema

You can test your MDX queries that will be used to populate the dashboard.

  1. Open the MDX query panel: File -> New -> MDX Query

  2. Copy & paste the following MDX query. Execute.

MDX query - All Call Regions

The last step is to from the Pentaho Server - PUC

• define a connection to the baseline_demo databse

• upload the Wireless carrier Mondrian Schema

  1. In the PUC select: Manage Data Sources.

  2. Click on the cog wheel & select: New Connection.

New JDBC connection
  1. Select Postgres and enter the following details:

baseline_demo connection details
  1. The Manage Data Sources also has the option to: Import Analysis

  2. Browse to: Workshop--CTools/schemas/Wireless Carrier.Mondian.xml and associate with baseline_demo datasource.

  1. Click: Import & check the xml schema has been successfully imported.

Wireless Carrier schema

The schema can now be referenced to create the dashboard mdx.mondrian.jndi queries.

We're going to make a few assumptions here ..

• connections tested

• the layout has been confirmed

• chart content & types agreed

• dashboard functions included - export graphs & tables

Dashboard layout

There are five “main” rows:

The first row contains four columns: one with the logo, and three with the selectors.

The second row contains two columns with the main KPIs: Number of Calls and Average Call Duration. Each column contains two rows: one for the header, and another for the data.

The third row has two columns, each with two rows.

The fourth and fifth rows have one column which contains two rows, but notice that the first row is split into two columns because there is a title and an Export button.

  1. Highlight: /Public/CTools-Dashboard/Carrier-Dashboard-Layout/Layout.

  2. Select: Edit from the Folder Actions.

Keep the Layout dashboard open in its own tab.

You will need to refer to each Layout entity to apply the Property Values.

  1. Create a Layout folder in the PUC .. give it a go ..!


Most modern day layout are controlled by Cascading Style Sheets (CSS)

Add a Resource - CSS
  1. Click on the Add Resource option in the Layout Structure toolbar.

Add Resource
  1. Enter the following options:

CSS External File
  1. Click on the ^ button and browse for the file.

Add dashstyle.css
dashstyle.css
  1. Finally check the CSS has been applied.

  2. Save & Preview the dashboard.

Layout

Now that the Layout is complete, time to turn our attention to CDA data sources.

All the data in this dashboard comes from ten MDX queries.

The three selectors:

• Source Region

• Destination Region

• Month

are all populated via MDX queries, as are each of the tables and charts in the dashboard.

We're going to add two MDX queries to the dashboard.

• First query returns the values for the Source Selector.

• Second query returns the results for the main dashboard table that includes several defined parameters.

MDX Data Sources

Let's start with the MDX query that retrieves the list of Regions.

Start with the Layout dashboard ..

Layout

  1. Browse to: /Public/CTools Dashboard/Carrier-Dashboard-CDA/Layout

  2. Click Edit under File Actions.

Layout Dashboard
  1. On the CDE Perspectives Toolbar, click the Data Sources Panel icon.

mdx over mondrianjndi
  1. From the Data Source list, expand MDX Queries, and then click mdx over mondrianjndi.

  2. To name this data source, in the Properties pane:

• Click in the Value for the Name property.

• Type sourceSelectorQuery.

• Press Tab or Enter.

Its BP to add the suffix “Query” to the data source name.

  1. In the Properties pane:

• Click in the Value for the Jndi property.

• On the keyboard, press the down arrow.

• Select the BaselineDemo connection.

  1. In the Properties pane:

• Click in the Value for the Mondrian schema property.

• On the keyboard, press the down arrow.

• Select the Wireless Carrier schema.

  1. To enter the MDX query:

• In the Properties pane, click the ellipsis icon to the right of the Query property.

• In the MDX Editor window, enter the following MDX query, and then click OK:

The query creates a calculated member (Source Member Name) and obtains the list of Source Regions from the Call Source dimension.

sourceSelectorQuery
  1. Save & Test the Layout.cda

Layout.cda
  1. To change the order of the columns:

• In the Properties pane, click in the Value for the Output Columns property.

• In the new window, click the Add button once to add another field.

• In the first Index field, type 1.

• In the second Index field, type 0.

• Click OK.

Change the column order
  1. Save the dashboard and try again .. Refresh the layout.cda

Refresh CDA Dashboard

Next MDX query populates the main dashboard table. This query is a bit trickier as it includes parameters ..

  1. Duplicate the sourceSelectorQuery and change the name to tableQuery.

Duplicate Query
  1. Delete the Output columns.

Delete Output Columns
  1. Add the MDX Query.

It's out of scope to explain how MDX queries work , however, let's break this Query down into the various parts to hep explain whats happening behind the scenes:

Calculated Members Definition: The query starts by defining several calculated members in three groups (users, calls, and time), each following the same pattern:

Users:

Calls:

Duration:

The IIf Logic: Each "difference" measure uses IIf(IsEmpty()) to handle null cases.

This prevents division by zero errors and returns NULL if current month data is empty.

SELECT Statement:

On COLUMNS: Shows the current values and their percentage differences for users, calls, and duration

On ROWS: Uses CROSSJOIN to combine two dimensions:

${sourceCallParameter}${sourceChildren} (likely source locations/departments)

${destinationCallParameter}${destinationChildren} (likely destination locations/departments)

Template Parameters:

The query uses several parameters (denoted by ${...}):

${monthParameter}: Specifies the current month

${sourceCallParameter}: Source dimension

${sourceChildren}: Additional source hierarchy members

${destinationCallParameter}: Destination dimension

${destinationChildren}: Additional destination hierarchy members

From Clause: The data comes from a cube named [Call Corridor], which tracks call metrics between different locations.

The query is designed to display month-over-month comparisons of:

• Number of users

• Number of calls

• Total call duration

Each with their corresponding percentage changes, broken down by source and destination locations.

  1. To specify default values for the parameters:

• In the Properties pane, click in the Value column for the Parameters property.

• In the new window, click the Add button four times.

• In the Name and Value columns, type the following:

Parameter
MDX

destinationCallParameter

[Call Destination.Destination Geography].[All]

sourceCallParameter

[Call Source.Source Geography].[All]

monthParameter

[Time.Standard Time].[2011].[Q1 2011].[January]

sourceChildren

.Children

destinationChildren

.Children

.Children returns all the direct child members of a given member in a hierarchy. When used with crossjoined tables, it returns the immediate descendants of the specified level or member.

  1. To see the new results in CDA:

• From the Opened perspective, click the layout.cda tab.

• Right-click the layout.cda tab.

• From the menu, select Reload Tab.

• In the Confirm Reload dialog, click Yes.

tableQuery

The column names and data formats are not ideal. We will improve the appearance of the data when we create the table later.

For now let's modify the column names for the tableQuery.

  1. To specify column names for the query output:

• In the Properties pane, click in the Value column for the Columns property.

• In the new window, click the Add button seven times.

• In the Index and Name columns type the following, and then press OK.

Index
Name

0

Source Call

1

Destination Call

2

Users

3

m/m-1

4

Calls

5

m/m-1

6

Duration

7

m/m-1

Rename Columns
  1. Save and again check in CDA dashboard.

Column Names

The lineChartQuery

  1. Duplicate the tableQuery and rename to: lineChartQuery.

lineChartQuery
  1. Replace the existing MDX query:

  1. To edit/delete the column names:

• Click in the Value column for the Columns property.

• To the left of Index 0, click the delete icon.

• Click Remove.

• Change Index 1 to Number of Calls.

• Change Index 2 to Number of Users.

• Delete the remaining column names.

• Click OK.

Change column names
  1. Save and view in CDA Dashboard.

lineChartQuery

Last updated

Was this helpful?