Book Image

Business Intelligence with MicroStrategy Cookbook

By : Davide Moraschi
Book Image

Business Intelligence with MicroStrategy Cookbook

By: Davide Moraschi

Overview of this book

Business intelligence is becoming more important by the day, with cloud offerings and mobile devices gaining wider acceptance and achieving better market penetration. MicroStrategy Reporting Suite is a complete business intelligence platform that covers all the data analysis needs of an enterprise. Scorecards, dashboards, and reports can be explored and delivered on desktop, the Web, mobile devices, and the Cloud. With the latest Visual Insight tool, MicroStrategy brings the power of BI to the business users, allowing them to discover information without the help of IT personnel. Business Intelligence with MicroStrategy Cookbook covers the full cycle of a BI project with the MicroStrategy platform, from setting up the software to using dashboards in the cloud and on mobile devices. This book uses step-by-step instructions to teach you everything from the very basics to the more advanced topics. We will start by downloading and installing the software and a well-known sample SQL Server database. Then, one brick at a time, we will construct a fully-featured BI solution with a web interface, mobile reporting, and agile analytics. The chapters are ordered by increasing difficulty, and each one builds on top of the preceding chapter so that the learning process is progressive. The examples given in this book are practical, and you will be able to see the immediate result of your efforts. We will first cover setting up the platform, including the creation of the metadata and the different objects that are part of a BI project: tables, attributes, and metrics. Then, we take a look at how to create and analyze reports, charts, documents, and dashboards, as well as how to manipulate data with the desktop application, the web Interface, and an iPad device. The last part of the book is dedicated to advanced topics like the new agile analytics technology from MicroStrategy, where we cover both Visual Insight and MicroStrategy Cloud Express. Whether you are a database developer, data analyst, or a business user, Business Intelligence with MicroStrategy Cookbook will get you up to speed with one of the most powerful BI platforms on the market with the smallest possible investment of time and money.
Table of Contents (25 chapters)
Business Intelligence with MicroStrategy Cookbook
About the Author
About the Reviewers

Setting up the AdventureWorks DW sample database

Now that the instance is up and running, we can load the data into it. First, we'll create a database that will be populated with sample data.

Getting ready

You need to have completed the previous recipe to continue, and then unzip the AdventureWorks 2008R2 Data file into the folder C:\install\, so that you will end up with a folder named AdventureWorks 2008R2 Data Warehouse containing a series of SQL script files; the main being named instawdwdb.sql.

How to do it...

Before running this script we need to modify it, in order to specify the name of the source folder containing the CSV files and the name of the destination folder that will store the resulting database:

  1. Create a directory named C:\datawarehouse; this will be the location of our database.

  2. Open in Notepad the file instawdwdb.sql and modify lines 36 and 37 so that they look like:

    :setvar SqlSamplesDatabasePath   "C:\datawarehouse\"
    :setvar SqlSamplesSourceDataPath "C:\install\AdventureWorks 2008R2 Data Warehouse\"


    The two hyphens at the beginning of the lines (comment marks) have been removed and the path to data folder and source scripts folder have been modified, they both include the trailing backslash.

  3. Save the file and close Notepad.

  4. Open a command prompt and enter the following command:

    sqlcmd -S (localdb)\v11.0 –i "C:\install\AdventureWorks 2008R2 Data Warehouse\instawdwdb.sql"


    This command must be written all in one line and including the double quotes.

How it works...

The script will create the database and all the needed tables. Then will import the CSV data files into the tables to populate them with data. The script will lastly exit the sqlcmd command interface.

There's more...

In order to check if everything was installed correctly, we will perform a couple of very simple SQL queries on the database:

  1. Open the sqlcmd utility again:

    sqlcmd -S (localdb)\v11.0
  2. At the 1> prompt, write the following instructions each on its own line, followed by the Enter key:

    use AdventureWorksDW2008R2
    select count(1) from FactInternetSales
    select count(1) from DimCustomer

The database will respond with the number of rows in the main fact table and the customer dimension table, 60398 and 18484 respectively.

Congratulations, you correctly installed the data warehouse source database!


You can watch a screencast of this operation at:


Exercise 1

From the sqlcmd utility execute the queries to count the number of records in the following tables: FactCurrencyRate, FactResellerSales, DimGeography, DimDate, and DimCurrency. Note down the numbers.