6/14/2017 - Introduction to Building Dashboards in Flow

Overview


Flow enables you to build dashboards that contain a variety of elements; these include tables, charts, reports, and data summaries, among others. This post focuses on two methods you can use to build, populate, and update dashboards. I show how to add a new dashboard, then demonstrate how to create a chart result using one of the sample datasets provided with Flow and it to that dashboard. Next, I provide an in-depth discussion on adding workflow generated results to a dashboard.

Getting Started

Add the Sample Data


After logging into Flow, you'll first need to add the "Sales and Marketing" sample dataset to your Flow account. Click on the down arrow down arrow button in the top menu bar then click on the sample data sample data icon to open the Add Sample Dataset dialog. Click the ADD link next to the "Product Sales" entry.

The sample data will be added to your account, see below.

sample dataset

Add a New Dashboard


sample dataset

Adding a new dashboard is easy. From the Dashboard menu at the bottom right of the Flow portal, just click on the Add New Dashboard button.

The Add New Dashboard dialog will appear. Enter a dashboard name and description then click the Add Dashboard. button

add dashboard dialog
dashboard menu

The dashboard name will appear in the Dashboards list. Just click on the dashboard name to open it.

Not much of a dashboard at this point. We need to add some results to make it little more interesting.

In Flow, results are elements such as reports, charts, or tables created from either datasets or hypercubes. There are two ways to create results. The first way is to add them manually from within the Flow portal. The second way is to generate them from a workflow.

sample dataset

Create a Chart Result and Add It to the Example Dashboard


Step 1 - Create a Chart
data set

We'll use our sample dataset to create a chart result then add it to the dashboard we created above. To get started, open Sales and Marketing sample dataset added earlier; it is in the Data list located in the left-side menu. Just click on the name Sales and Marketing to open it.

The dataset window open to display the Sales and Marketing data. Click the chart icon add chart button to open theAdd Chart dialog.

sample dataset
add chart dialog

To create a chart, do the following:

  • Enter a name and title
  • Select the X Axis value, in this case, Region
  • Select the Y Value; we'll use Brand X Sales 2015
  • Select an additional Y Value: use Brand X Sales 2016
  • Finally, click the Create Chart button

After you click Create Chart, the chart preview window will open.

sample dataset
Step 2 - Save the Chart

Click the disk disk icon icon to add the chart result. It is then added to your saved results and displayed in the Reports and Charts list under the Results section of the left sidebar, as shown to the right.

chart menu
Step 3 - Add Chart to the Example Dashboard

In the Reports and Charts list, click on the Sales and Marketing chart name to open it. Next, click the dashboard dashboard icon icon at the top of the chart window. The Add Result to Dashboard dialog will appear. Select Example Dashboard and click Add to Dashboard. The chart result is added to the dashboard.

add result to dashboard
View the Dashboard
example dashboard

From the Dashboards list at the bottom of the left sidebar, click on the Example Dashboard name to open and view it.

We can follow similar steps to add reports, tables, datasets, and other dashboard elements.

Creating a Dashboard from Workflow Generated Results


Results created from datasets and stored in the Flow portal are static; whereas results generated by a workflow will update each time the workflow runs and therefore capture any changes in the underlying data sources. To demonstrate this, build a workflow that generates several types of results. These will include various types of tables, reports, and charts.

Basic Steps

Here are the basic steps I'll cover below.

  1. 1 Start Cloud Connect
  2. 2 Add a new workflow
  3. 3 Add workflow actions to generate results
  4. 4 Run workflow
  5. 5 From Flow portal, add results to dashboard
  6. 6 View dashboard

Here is the complete listing of workflow actions we'll create.

dashboard workflow

1. Launch Cloud Connect


Flow provides an integrated development environment for building analytics-oriented workflows called Cloud Connect.

Cloud Connect is ClickOnce deployed software for developing and managing workflows. To launch Cloud Connect, open the Workflows menu in the left sidebar of the Flow portal then click the Launch Cloud Connect button, see below:

Depending upon your browser, you may need to add an extension to enable ClickOnce and launch Cloud Connect. Click on the View Cloud Connect Requirements link beneath the Launch Cloud Connect button to learn the requirements for your particular browser. If this is your first time using Cloud Connect, it may require a minute or so to install. Once the installation has completed, the application will open automatically.

workflow menu

2. Add a New Workflow


add basic reporting flow
open workflow

To get started, we'll need to add a new workflow. From the Cloud Connect top menu, click the add workflow button. The Add New Workflow dialog will appear as shown on the right.

Enter the workflow name then click OK. The new workflow is added to the Workflows list on the left-side of your screen. To open the workflow for editing, simply double click its name. Alternatively, you can right-click the name and then select Open from the context menu.

3. Add a Load Data Workflow Step


Add a Load Dataset step by clicking on the actions menu menu and selecting Load Dataset from the drop-down menu, the Load Dataset Dialog will display.

Select the "Marketing and Sales" dataset from the drop-down list then click OK to add the Load Dataset workflow step.

Next, click the run button button on the Workflow Menu then pressEnter or click Yes in response to the Run All dialog. The Load Dataset action will run and import the Product Sales data. The data will be displayed in the Workind Data at the botton of your screen.

load dataset workflow action

4. Add a Build Hypercube Step


Flow builds tables, pivot tables, and grouped reports from hypercubes. A hypercube is a specialized data container used to group and summarize multidimensional data.

  • From the Working Data drop-down list, select the Market Sales dataset, a check box list of possible dimensions will be displayed.
  • Add dimensions for State, Region, Store Type, etc. by checking the box next to each data point name.
  • Enter Sales and Marketing Cube in the Hypercube Name text box.
  • Click OK to add the Build Hypercube workflow step.

Click OK, the Build Hypercube workflow step will be added to the workflow steps list.

Run the workflow again and view the results. Click the run button button in the workflow menu bar and answer Yes to the prompt. When the workflow completes, the working data tab will display a flattened view of hypercube, see below.

5. Add Hypercube Expressions to Summarize Data


At this point, we've loaded our Product Sales dataset, added an expression to extract the year group value, and built a hypercube from which we can generate our report.

We now want to compute summary values for the various sales data points. Flow provides an extensive library of functions and operations for computing summary values across hypercube dimensions. We are going to add an Expression Evaluation step that will comput summary values for our various sales measure.

From the Actions drop-down menu, select Expression Builder, the Expression Builder dialog appear as shown.

  • Select the Grouped Report Hypercube from the Collection drop-down list in the Expression Builder's Select Working Data box.
  • Check the Hypercube check box next to the Collection drop-down list.
  • In the Select Expression and Operation Type box, Select the Stat expression type from the Expression Type drop-down list.
  • Next, select the Sum operation from the Operation drop-down list.
  • Within the Build Expression box, under Input 1, use the Datapoint drop-down list to choose the Brand X Sales 2015 datapoint.
  • In the Result box, enter a name for the expression result, in this case: Brand X Sales 2015
  • Click the Add Expression button to add the expression to the list of expressions that will be evaluated when this workflow step runs.
run all dialog

When you are finished, click OK. The Expression Evaluation workflow step will be added to the workflow steps list.

Run the workflow again and view the results. Click the run button button in the workflow menu bar and answer Yes to the prompt. When the workflow completes, the working data tab will display a flattened view of hypercube which includes our expression evaluation results.

6. Add Tables and Pivot Tables


Add Workflow Actions to Create Pivot Tables

Our dashboard will display several tables: two pivot tables and a summary table. Pivot tables summarize hypercube measures by two or more dimensions. A pivot table sums a measure defined by the combination of two dimensions. Each cell in pivot table represents a unique pair of dimensions. A table summarizes values by one or more nested dimensions.

I'll first discuss how to add a pivot table result. To start, from the Results menu, select the Pivot Table menu item as shown to the right, the Pivot Table Result dialog will appear, see below.

pivot table menu item

Follow these steps to add the first pivot table:

  • From the Pivot Table Result dialog Hypercube drop-down list, select the Sales and Marketing Cube.
  • In the Table Data box select Store Type from the Column Data drop-down list.
  • Next, select Region from the Row Data drop-down list.
  • Enter the Result Name, Title, and Description as shown.
  • Finally, click OK to add the Pivot Table Result workflow step.
pivot table dialog

To add the second pivot table, follow the steps outlined above only select 2016 Brand X sales as the cell data.

Add Workflow Action to Create a Table
pivot table dialog

Follow these steps to add the Sales Summary by Region and State table:

  • From the Pivot Table Result dialog Hypercube drop-down list, select the Sales and Marketing Cube.
  • In the Table Data box select Store Type from the Column Data drop-down list.
  • Next, select Region from the Row Data drop-down list.
  • Enter the Result Name, Title, and Description as shown.
  • Finally, click OK to add the Pivot Table Result workflow step.

The workflow steps add thus far

pivot table result

7. Add Top N reports


We want to display two reports in dashboards, one showing the top ten sales from 2015 and one showing top ten sales for 2016. There are two workflow steps required to generate each of these reports. First, we use a Top N Filter to create datasets containing the top-ten sales for each year, second; we add Tabular Report steps to create report results for each dataset.

Step 1 - Add Top N Filters

To add a Top N Filter action, select Working Data from the Actions menu, then Filter and, finally, Top N Filter as shown to the right. The Filter Top N dialog will appear.

Note: You can also create bottom n filters using this dialog.

dashboard filter
top 10 sales

Follow these steps to get the top 10 sales for 2015:

  • Select Sales and Marketing from the Working Data drop-down
  • Select the Brand X Sales 2015 datapoint
  • Select the Filter Top N for Filter Type
  • Enter a value of 10 for Select Numeric Value For N
  • Enter Top 10 Sales 2015 for the Result Collection name
  • Click OK

After you click OK, the Filter Top N action will be added to the workflow actions. Click the Run button to view the Top 10 Sales for 2015 dataset result. To get the top 10 sales for 2016, follow the steps outlined above, only this time select the Brand X Sales 2016 data point and name the collection, a.k.a dataset, Top 10 Sales 2016.

After adding these steps, run the workflow again. The new datasets will appear in the working data tab, see below:

dashboard daaset
Step 2 - Add Top 10 Reports
top 10 report

After generating the above datasets, we can add Tabular Report actions to create a top 10 report for each dataset.

From the Results menu, select Tabular Report to open the Tabular Report dialog. Follow these steps to add a Top 10 Brand X Sales 2015 report

  • From the Working Data drop-down list, select the Product Sales dataset.
  • Enter the Report Name, Title, and Report Description as shown.
  • Add Report Columns
    • In the Report Elements -> Select Report Columns, select a column from the Columns drop-down list.
    • Enter the column header in the Column Header text box, or accept the default header (the column name)
    • If the column's data type is numeric, optionally select a Number Format from the drop-down list.
    • Optional - use the Sort drop-down list to select a sort direction and include the the column in the report sort order.
    • Optional - check the Include Total box to display a column total.
    • Click the Add Column button to the add the report column. The column will be added to the Columns list.

When you have finished selecting report elements, click the OK button to add the Tabular Report action. Run the workflow again to generate the report. Note - certain workflow results, such as tables, charts, and reports, are not displayed in Cloud Connect. Instead, they are automatically saved to your account and viewed from the Flow Portal.

To view the report results, open the Flow Portal then expand the Reports and Charts result list in the left sidebar. Click on the report name to open it.

dashboar report

8. Add Chart Results


Adding a chart result is easy. Under the Results menu, click on the Charts menu item as shown on the right. The Chart result dialog box will appear.

dashboard chart
add dashboard chart

Here are the required entries for the first chart action:

  • Select a working dataset, in this case Sales and Marketing from the Working Data drop-down.
  • Enter a name and title for the chart
  • Choose the column chart type from the chart typelist. Note- you can dynamically change the chart type from within the dashboard
  • Select the X Axis value, in this case Region
  • Select the Y Value, we'll use Brand X Sales 2015
  • Select an additional Y Value: use Brand X Sales 2016
  • Finally, click the OK button to add the chart action.

Running this workflow action will generate the chart and automatically add it to your saved results list. To view the chart, open the Flow portal, refresh the page, then open the Reports and Charts list in the left sidebar.

dashboard chart display

9. Add Summary Results


Thus far we've added table actions, report actions, and chart actions. We could add many additional result types including dataset, hypercube, geographic, summary, and KPI results. However, space is limited, so we'll add just one more: a summary result.

Summary results compute descriptive statistics for an entire dataset; these statistics include sum, mean, median, and mode among others. There are two steps required to add a summary result. The first step is to add an expression action containing statistical expressions that store their computed results in workflow variables. The second step is to add a Summary Result workflow action.

Add an Expression Action
dashboard data summary

Our expression action's list contains expressions that calculate the sum of various sales quantities for 2015 and 2016. Here are the steps required to add an expression:

  • Select the Sales and Marketing Collection
  • For Expression type, select Stat(Single)
  • Select the Sum Operation
  • In the Datapoint drop-down, select Brand X Sales 2015
  • Check the Variable radio button and enter the result name: Total Brand X sales 2015
  • Click Add Expression

When this workflow action runs, it will compute the summary values and save them to a set of variables. You can view the variable values by selecting the Variables tab under Working Data. See below.

Variables in Working Data

summary variables
Add the Summary Result
summary result menu item

We'll need to add a Summary Result step that maps each of the above variables to a summary result. This step is basic. From the Result menu, select the Summary Result menu item, the Summary Result dialog will be displayed, as shown below.

dashboard data summary

Data Summary Dialog

  • Select a Summary Variable then give it an Item Name and, optionally, a description.
  • Click the green plus button to add the summary result item
  • When finished, click OK to add the Summary Result action.

When this Summary Result action is executed, it will create the summary results and save them to your account.

This is the last action we'll add to this workflow. When we run the workflow again, it will create a set of results that we can add to our Example Dashboard.

Add Workflow Results to Dashboard


dashboard example

In the Reports and Charts list, click on each result name to open it; then click the dashboard dashboard icon icon at the top of the result display to open the Add Result to Dashboard dialog. Just select Example Dashboard and click Add to Dashboard. The result is added to the dashboard.

View Dashboard


That's it; we built a workflow that generates three tables, two reports, four charts, and a set of summary values displayed in a dashboard. If the data source this workflow used to produce these results changes from time to time, the dashboard results would be updated to reflect the most recent data each time the workflow runs.

example dashboard

Summary


This post focused on two methods you can use to build, populate, and update dashboards. I showed how to add a new dashboard, then demonstrated how to create a chart result using one of the sample datasets provided with Flow and add it to that dashboard. Finally, I provided an in-depth discussion on adding workflow generated results to a dashboard.