Business Intelligence Blogs

View blogs by industry experts on topics such as SSAS, SSIS, SSRS, Power BI, Performance Tuning, Azure, Big Data and much more! You can also sign up to post your own business intelligence blog.

«October 2015»

Data Warehouse from the Ground Up at SQL Saturday Orlando, FL on Oct. 10th

SQL Saturday #442SQL Saturday #442 is upon us and yours truly will be presenting in Orlando, Florida on October 10th alongside Mitchell Pearson (b|t). The session is scheduled at 10:35 AM and will last until 11:35 AM. I’m very excited to be presenting at SQL Saturday Orlando this year as it’ll be my first presenting this session in person and my first time speaking at SQL Saturday Orlando! If you haven’t registered yet for this event, you need to do that. This event will be top notch!

My session is called Designing a Data Warehouse from the Ground Up. What if you could approach any business process in your organization and quickly design an effective and optimal dimensional model using a standardized step-by-step method? In this session I’ll discuss the steps required to design a unified dimensional model that is optimized for reporting and follows widely accepted best practices. We’ll also discuss how the design of our dimensional model affects a SQL Server Analysis Services solution and how the choices we make during the data warehouse design phase can make or break our SSAS cubes. You may remember that I did this session a while back for Pragmatic Works via webinar. I’ll be doing the same session at SQL Saturday Orlando but on-prem! ;)

So get signed up for this event now! It’s only 11 days away!

Read more

Create Date Dimension with Fiscal and Time

Here are three scripts that create and Date and Time Dimension and can add the fiscal columns too. First run the Dim Date script first to create the DimDate table. Make sure you change the start date and end date on the script to your preference. Then run the add Fiscal Dates scripts to add the fiscal columns. Make sure you alter the Fiscal script to set the date offset amount. The comments in the script will help you with this.

This zip file contains three SQL scripts.

Create Dim Date

Create Dim Time

Add Fiscal Dates

These will create a Date Dimension table and allow you to run the add fiscal script to add the fiscal columns if you desire. The Create Dim Time will create a time dimension with every second of the day for those that need actual time analysis of your data.

Make sure you set the start date and end date in the create dim date script. Set the dateoffset in the fiscal script.

Download the script here:


Read more

Using Power Query to Parse your Inbox

  • 13 December 2013
  • Author: DevinKnight
  • Number of views: 7748

One of the nice new features that was added to Power Query with the latest update in December is the ability to connect to Microsoft Exchange as a data source.  You can download this update now here:

Here’s a quick demonstration of how you may use the Microsoft Exchange data source in a Power BI solution:

After downloading and installing Power Query launch Excel and navigate to the Power Query tab.  If you don’t see the Power Query tab you may need to turn on the feature, which I describe here. From the Power Query Tab select From Other Sources and pick From Microsoft Exchange.


Next you must provide your Microsoft Exchange credentials.


It will then prompt you to authorize Power Query to access your account.


Once the authentication completes the Navigator pane will launch with a view of your Exchange account.


In the Navigator pane you can select you mailbox, calendar, contacts, or tasks.  You could hover over each of these options to get a preview of what the data looks like.  For this demonstration select Mail then pick Edit Query.  This will launch the Query Editor with an entry for each email in your Inbox.  Of course if you have thousands of emails this will show just a sampling of the email you have.


I’ve hidden the results in this screen shot to protect the innocent but it does indeed return back my mailbox results.  Here’s the kind of metadata it returns.

  • Inbox Path
  • Subject
  • Sender
  • To
  • CC
  • Time Sent
  • Time Received
  • Importance
  • Is Read?
  • Has Attachments?
  • Preview of the Body
  • The Full Email Body
  • Etc…

What I’d like to do is see who sends me the most emails. So I expand the sender column to return back the Name of the sender for each of these emails.  I only care about the Name column so I’ll filter out the address.


For this example I only care about counting the number of emails I get by sender so I’ll remove all the irrelevant columns and only keep the Sender.Name.  To remove all other columns select the one you want to keep then right-click on one of the columns and select Remove Other Columns (My screenshot show this on a different column). 


This will leave you with only one column but we need at least one other column to aggregate the number of Emails.  This can be done by creating an Index column.  Right-Click on the only remaining column and select Insert Index Column.  This will be used for returning a count of emails.  This could have also likely been done by doing a count of the ID column that was in the original dataset.  Click Apply & Close to take the results of this Power Query solution and build a report on it.  This may take a while depending on how many emails you have. 

I’ve decided to create a Power View Report to visualize who emails me most.  With the Power Query table selected in Excel go to the Insert menu and select Power View.  Once Power View launches it will automatically place the Sender and Index column into a table.  Change the Index column to Count (Not Blank).  This will produce an output that shows each sender and the number of emails from each.


Now, change this visualization to a Stacked Bar chart to easily visualize each sender and the number of emails they send.  After sorting the chart descending I see the final result shows that the Brian Knight, my brother and owner of the company, is the person that fills up my inbox the most.


Now this is a neat demonstration, but how can you make it work for a business solution?  Personally, I know severally organizations that could use this for parsing support inboxes to organize and see which users have taken up the most time (inbox time at least) from support.  So yes there is a business application and a pretty neat one at that!

Go download the latest Power Query update here:

Are you interested in learning more about Power BI?  Attend one of the classes I offer either in person or virtually

Virtually –

In Person Workshop –

Rate this article:
No rating


Other posts by DevinKnight

Please login or register to post comments.