How to build Excel Dashboards – 8

March 4, 2010 – 9:59 am

Previous – Excel Dashboard Tutorial – 7

Create Pie Chart

We will now create a pie chart by product name

Image

 

Image

 

It is nice to know that the revenue distribution is not dominated by a single product.

We can now change the “Category name parameter” to see the product distribution for other category

Image

By Category = Beverages

Image

Summary of steps so far
” Create a foundation table portlet (Qlet)
” Add Calculations and any derived columns
” Add Date hierarchy columns as needed
” Create Date parameters if needed
” Create drop down list of values as parameters
” Create charts using the base Qlet
” Delete the foundation portlet when not needed and you are done with the dashboard design
” Arrange the remaining portlets in desired format.

Once you are done with all the Qlets (query/table portlet) and Glets (graphic portlets), it is advisable to save the dashboard file, copy the file and work on the new file for finishing and polishing the dashboard.

Next – Excel Dashboard Tutorial – 9

How to build Excel Dashboards – 6

March 2, 2010 – 8:49 pm

Previous – Excel Dashboards – 5

Create Year and Category Parameters

Remember, we have not built any charts yet. It is very important that we build our foundation Qlet and its corresponding parameters so that all of the drop down parameters can be leveraged in the charts.

It definitely helps to plan your dashboard development. Since the dashboard tool is easy to work with, we should still make an attempt to always plan so that we don’t duplicate our effort.

During the development, it may happen that you will get lots of ideas on implementing different ways. I would suggest to save the base dashboard definition once you have frozen all the parameters and Qlets. Before you start building charts, create a copy of the dashboard file as backup.

In our data, we have details about items that are sold on a particular date. We have the unit price, and quantity information. We also have the category for each item that they belong to. So it makes sense to include a parameter for the item category so that we can select only the items belonging to a particular category.

Right click on the “Category Name”, navigate to Create ==> Create Parameter

Image

It creates a new parameter named “Category Name”

Image

 

You may place this anywhere you feel appropriate.

Similarly, right click on the “Or Year” column and create the parameter

Image

 

Image

 

NOTE: Often it does not make sense to have a year drop down and a date range parameter.

Because if the year value and the date ranges fall apart or do not intersect then you will not see any data output. In this tutorial we provided the year and date ranges only for demonstration so if you need only one, do not use the other.

Next – Create Excel Dashboard – 7

How to build Excel Dashboards – 5

March 2, 2010 – 8:40 pm

Previous Article – Create Excel Dashboards – 4

Add Date Hierarchy Columns

Most of the data, has some form of date information. Now date is very granular information. Very often, to generate trending information, you need to derive year and month columns.

In the dashboard designer, you can easily generate Date hierarchy columns for any kind of reporting.

In our example, we have order date, so we will generate the Year, Quarter, Month, Day , Week and other flavors of the same information for better representation.

Right click on the “Order Date” column and navigate to Create ‘ “Add Year, Quarter, Months column

Image

 

Image

 

Click on “Add” and it will add the following columns to the right of the primary column “Order Date”

Image

 

You may not need all of the date derived columns but it is worth understanding what they stand for.

The derive columns, have a prefix of “Or” which are the first two letters of the primary date column “Order Date”. The remaining part explains the actual part of the date.
1. Year : represents the year component of the date
2. Mth N : represents the numerical month.
3. Mth Disp: represents the month number but padded with zero on the left
4. Mth NN: represents month number and 3 letter month name
5. Yr Mth : represents the year and month number
6. Qtr: represents the quarter number
7. Week : represents the week of year
8. Dy: represents day of year
9. … and so on.

The concept of date hierarchy even though simple to implement is very powerful. Within few minutes you can derive important “Insight” into your data. We will now begin the process of deriving intelligence out of boring data. Now begins the fun part.

Create Date Filter and Parameters

If you work with real transaction application, you already know that the amount of data is huge and the data has some form of date column. This date could be transaction date, invoice date, order date, payment date etc.

One of the dashboard and reporting best practices is to have some form of date filter and/or parameters so users can dynamically choose the date range. This helps in narrowing down the data for analysis.

Let us create a simple date filter.

One of the typical requirement is to see data for “as of today”.
In the dashboard designer it is few click process to implement this.
Image

Right click on the Date column (order date), Navigate to

Create ==> Create Date Filter

Image

 

The detail use of the Date Filter is covered in a separate tutorial. As we have very minimal use of the date filter for the dashboard that we are building we will just touch the basics.

In the date filter, on the left you see the column name and on the drop down you see different options such as below
Image

” First Day of Month
” Last Day of Month
” First Day of Qtr
” Last Day of Qtr
” First Day of Week
” Last Day of Week
” First Day of Year
” Last day of Year

For our purpose we just limited our data to be less than today.

Click on “use this filter” and it will be applied to the Qlet.

One of the best practice is to avoid hard coding of any values in the Query. For e.g, The dashboard designer allows you to build drop down list of values as parameters to the query. We will leverage this option to the fullest so that the dashboard is extremely useful and can respond to data changes.

We will create a From and To Date range parameter

Right click on the “Order Date” column, Navigate to Create ‘ Create Parameter
It instantly creates two Data Parameters
Image

We arrange them and size them appropriately as below

Image

 

Once arranged and formatted, you can type the date or popup the date picker by click on the button on the side

Image

 

Now, right click on the Title and select “Refresh”

Image

 

Change the From and To Date values and refresh, the Qlet will change the data accordingly.

Next – Create Excel Dashboards – 6

How to Create Excel Dashboards – 4

March 2, 2010 – 8:14 pm

Previous Part Build Excel Dashboards – 3

We will Add Calculations and Formulas

Add Calculations
Since this is a raw extract of actual transactions, it may need to add additional calculations and columns to create useful metrics.

For e.g in our sample file, we have the “Unit Price” and “Quantity” columns. We will create calculation to derive the “Amount” column

Image

 

Right click on the Quantity Column, Navigate to Popup Menu

Create ‘ –>Create Calculation
It shows a calculation wizard.
Image

1. Click on “Unit Price”
2. Click on * multiplication operator
3. Click on Quantity
4. Rename the column to “Amount”
5. Click on “Use this Formula”

As you see, the “Amount” column is added right next to the Quantity column

Image

 

Next – Add Date Hierarchy Columns Excel Dashboards – 5

How to Create Excel Dashboards – 4

March 2, 2010 – 8:09 pm

Previous Part Build Excel Dashboards – 3

We will Add Calculations and Formulas

Add Calculations
Since this is a raw extract of actual transactions, it may need to add additional calculations and columns to create useful metrics.

For e.g in our sample file, we have the “Unit Price” and “Quantity” columns. We will create calculation to derive the “Amount” column

Image

 

Right click on the Quantity Column, Navigate to Popup Menu

Create ‘ –>Create Calculation
It shows a calculation wizard.
Image

1. Click on “Unit Price”
2. Click on * multiplication operator
3. Click on Quantity
4. Rename the column to “Amount”
5. Click on “Use this Formula”

As you see, the “Amount” column is added right next to the Quantity column

Image

 

Next – Add Date Hierarchy Columns Excel Dashboards – 5

How to build Excel Dashboards – 3

February 22, 2010 – 8:45 pm

Previous step : Excel Dashboards – 2

Create Dashboard and Table portlet

Once connected, it will show you a list of action items to pick from

Image

We will click on “New Blank Dashboard

In the Dashboard Name, we type in “Order Management Analytics”

Image

Click OK.

It will present you with a table browser showing all the available worksheets as tables

Image

Expand the node to see all the worksheets.

In this example file, we just have one worksheet named “order_data”. Note how, it attaches a $ sign at the end, which indicates this is an Excel Worksheet.

So make sure you do not have any dollar sign when naming the Excel worksheet and no other special characters and no white or blank characters. Replace blank characters with “_” underscore character

Double Click on the “order_data$” node

Image

Click on the “* alias=ord” item at the very top to select all the items

Image

You may change the name of any column or any other property such as sort and group by.

We will leave it as it is and click on the “Create Table” button.

This action creates a Table Portlet (Qlet) in the Dashboard canvas

Image

We will use this Qlet as our basic building block for the following exercise

Next : How to build Excel Dashboards – 4

How to build Excel Dashboards – 2

February 21, 2010 – 8:34 pm

Previous Step: Excel Dashboards – Part 1

Launch Dashboard Software and Connect


Launch InfoCaptor Dashboard Software on your Desktop and click on the connect button on the toolbar

Connection wizard for Excel Dashboard

The connection wizard has items that simplify connecting to different data sources.

For Excel Files, Click on the Excel button

Image

Once you click, it automatically selects the appropriate Driver for you

Image

Click on the “Access/Excel File” button.

Select the order_raw.xls file. It populates the connect name for you. But you can change this name. Connect Name is for your reference

NOTE: Make sure that the order_raw.xls file is not open in MS Excel. The Excel file is locked once you connect to it. If the file is open in MS Excel, you may get connected but not able to query and may get unpredictable results.

Now, click on the Connect button
Upon successful connection, the connection wizard disappears and a new action wizard pops up.

Next : How to build Dashboards – 3

How to build Excel Dashboards – 1

February 21, 2010 – 8:22 pm

Databases are often under lock-n-key of the IT Department and not possible to connect directly due to security reasons. So if you plan to build a Dashboard prototype or a Dashboard Mockup it makes sense to export the data to Excel and build it.

Modular Dashboard Design
Lot of the online tutorials and Dashboard e-books teach you to build dashboard in Excel file. They provide you with templates, you fill in the information and build the dashboard using Excel charting techniques.

If you use Excel Templates for your real dashboarding needs then you may end up with any of the below problems.

” Big Bulky and bloated excel files
” Undocumented Macros
” Zero verification on the data authencity
” No way to refresh the dashboard (lost productivity)

“Best Practise for Dashboard Design”
Modular Design
Keep Data and Presentation Separate
How? – Use Excel only for storing your data. Nothing more.

Do not build any visualization in the same place where your Data resides.

Benefits of this approach
” Your dashboard or presenation layer is independent – Dashboard definition is stored separately
” Increased productivity – When you have fresh data just refresh the dashboard, no redevelopment needed
” No Messy Excel Macros or coding knowledge required – Just drag and drop tables and visually build Tables, Charts, Speedometer, Gauges, Dials, Thermometers and more charts
” Simplified Distribution and Presentation – You can Export the Dashboard to PDF or HTML and just send them as attachments
” Save Time – Just build the dashboard presentation layer only once and automate the refreshes.

Lets begin Building Dashboard

Data Preparation


Export your transaction data to Excel file by running a report or requesting your IT department.

There are certain rules to be followed when you get the data in Excel files.

Here is a sample Excel dump of Order Entry data.
The first row is always treated as the column names.

Raw data for Excel Dashboard

If you inherit an Excel file with pivots and charts all over the places then try to copy just the raw data in another worksheet in the same file or create another file. If it is not possible to keep the first row as the column names then you could define “named ranges”. In the dashboard designer it is possible to access the data using Cell ranges but then future updates to the Excel file could break the dashboard, for e.g if the data goes beyond the Cell range.

NOTE: Make sure column names do not have any funky characters. Just keep it to simple alpha-numeric column names.

Totals and Sub-Totals in Dashboard

February 13, 2010 – 12:16 pm

Data Model manipulation

If you are accustomed to the data manipulation in Excel then the following features will instantly enable you to change your table appearance and data manipulation ability to the next level.

 

//you can add blank rows and columns and also Grand total using the following API
// data.addColumn(”XYZ”,4); /* to add a new column at number 4 with title XYZ*/
// data.addRow(6); /* adds a blank row at number 6 */
// data.addRowTotal(”Grand Total”, 1, -1 ) ; /* The first input is the total label, second is the column position where the label appears, the third is to indicate which columns to total => -1 to total all numeric columns

//you can also perform calculations on the result from the Query
//You can access columns by col[column_number], rows by row[row_number] and each cell by cell[row, col]
//each instruction should end with a semi colon “;”
//all instructions should be enclosed within the <calc> …</calc> statements, it can span multiple lines. Following is just an example

// <calc>
//
// col[3]=col[2];
// rowl[4]=row[2]+row[3];
// col[5]=col[2] + col[3] + col[4];
// cell[2,3] = cell[3,3] * cell[5,6];
//
// </calc>
// Please delete the above instructions once you are familiar with them as it may affect performance

data.addSubTotal(”Person #DATA subTotall”, 0, -1 ) ;
data.addRowTotal(”Grand Total”, 1, -1 ) ;

Excel Date Functions

February 12, 2010 – 6:54 pm

In the information jungle for Excel, when it comes to find certain “How-to” with Excel, it is like finding a “needle in Mount Everest”.

Here is the list of functions that you can use when using ODBC + SQL + Excel

Again, the following stuff applies only when using SQL with Excel over ODBC connection.

One of the important function is Dateserial which converts to a date type given the year, month and day.

 

 

.

Excel date function string

.

Last Day of the month dateserial(year(now()),month(now())+1,0)

.

First Day of month dateserial(year(now()),month(now()),1)

.

First day of year dateserial(year(now()),1,1)

.

Last day of year dateserial(year(now()),13,0)

.

Week of year datepart(’ww’,now())

.

Week Day datepart(’w',now())

.

Quarter of year datepart(’q',now())

.

First day of Quarter dateserial(year(now), (datepart(’q',now())-1)*3+1 ,1 )

.

Last day of quarter dateserial(year(now), datepart (’q',now() ) *3+1 ,0 )

.

First day of week now() – datepart(’w',now())+1

.

Last day of week now() + 7- datepart(’w',now())