©  Adam Aspin 2018
Adam AspinPro Power BI Desktophttps://doi.org/10.1007/978-1-4842-3210-1_24

Sample Data

Adam Aspin
(1)
Stoke-on-Trent, Staffordshire, UK
 

Sample Data

If you wish to follow the examples used in this book—and I hope you will—you will need some sample data to work with. All the files referenced in this book are available for download and can easily be installed on your local PC. This appendix explains where to obtain the sample files, how to install them, and what they are used for.

Downloading the Sample Data

The sample files used in this book are currently available on the Apress site. You can access them as follows:
  1. 1.
    In your web browser, navigate to the following URL www.apress.com/9781484232095 .
     
  2. 2.
    Scroll down the page and click the tab Source Code/Downloads.
     
  3. 3.
    Click the link Download Now, and choose a directory where you will save the file PowerBIDesktopSamples.zip.
     
You will then need to extract the files and directories from the zip file. How you do this will depend on which software you are using to handle zipped files. If you are not using any third-party software, then one way to do this is
  1. 1.
    Create a directory named C:PowerBIDesktopSamples.
     
  2. 2.
    In the Windows Explorer navigation pane, click the file PowerBIDesktopSamples.zip.
     
  3. 3.
    Select all the files and folders that it contains.
     
  4. 4.
    Copy them to the folder that you created in step 1.
     

Images

The images used in various chapters can be found in the directory C:PowerBIDesktopSamplesImages.

Sample Databases

If you wish to load data from a SQL Server 2014 database or an Analysis Services database, you will need to restore the sample SQL Server and Analysis Services databases that are in the C:DataVisualisationInExcel2016Database directory.

The CarSalesData Database

This database is available in the sample data as the file CarSalesData.bak in the directory C:PowerBIDesktopSamplesDatabaseBackups. You will also need to create a directory for the database files. In the following code, this is C:PowerBIDesktopSamplesDatabases.
Before you can load this database, you will need access to a functioning SQL Server database instance. If you need to, you can download and install the free SQL Server 2014 Express version. It is currently available at the following URL:
Once installed, you will need to restore the database backup:
  1. 1.
    Open SQL Server Management Studio Express.
     
  2. 2.
    Open a new query window by clicking New Query in the toolbar.
     
  3. 3.
    Run the following script:
    USE [master] RESTORE DATABASE [CarSalesData]
    FROM  DISK = N'C:PowerBIDesktopSamplesDatabaseCarSalesData.bak'
    WITH  FILE = 1
    ,  NOUNLOAD,  STATS = 5
    ,MOVE 'CarSalesData' TO 'C:PowerBIDesktopSamplesDatabaseCarSalesData_Data.mdf'
    ,MOVE 'CarSalesData_Log' TO  C:PowerBIDesktopSamplesDatabaseCarSalesData_Log.ldf'
    GO
     
The database will be restored, and can be used in the examples.

The CarSalesMemoryBased Database

This database is available in the sample data as the file CarSalesMemoryBased.bak in the directory C:PowerBIDesktopSamplesDatabaseBackups. You will also need to create a directory for the database files.In the following code, this is C:PowerBIDesktopSamplesDatabases.
  1. 1.
    Open SQL Server Management Studio Express.
     
  2. 2.
    Open a new query window by clicking New Query in the toolbar.
     
  3. 3.
    Run the following script:
    USE [master] RESTORE DATABASE [CarSalesData]
    FROM  DISK = N'C:PowerBIDesktopSamplesDatabaseCarSalesMemoryBased.bak'
    WITH  FILE = 1,  NOUNLOAD,  STATS = 5
    ,MOVE 'CarSalesMemoryBased' TO 'C:PowerBIDesktopSamplesDatabaseCarSalesMemoryBased_Data.mdf'
    ,MOVE ' CarSalesMemoryBased _Log'
    TO 'C:PowerBIDesktopSamplesCarSalesMemoryBased_Log.ldf'
    GO
     
The database will be restored, and can be used in the examples.

The Analysis Services Database

To restore the Analysis Services database, you will first need a functioning SSAS instance. You can then restore the file CarSalesOLAP,abf using the standard SSAS database restoration techniques.

The SSAS Tabular Database

To restore the Analysis Services database, you will first need a functioning SSAS tabular instance. You can then restore the file CarSalesTabular,abf using the standard SSAS database restoration techniques.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.182.62