A tutorial showing how to import data from Excel, Access and many other sources
Part four of a five-part series of blogs

You can import data into tabular models from virtually any data source, as shown by this tutorial.

  1. Importing data from other data sources
  2. Importing data from Excel, Access, CSV files or the clipboard
  3. Importing data from SSRS (Reporting Services)
  4. Importing from Analysis Services cubes/tabular models (this blog)
  5. Importing from other data sources

This blog is part of our online SSAS Tabular tutorial; we also offer lots of other Analysis Services training resources.

Posted by Andy Brown on 04 January 2016

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

Importing from Analysis Services cubes/tabular models

This page of the blog shows how you can import data from:

  • cubes that have been deployed from SSAS Multi-dimensional; or
  • Other tabular models.

Importing from SSAS Multi-dimensional cubes

Assume that you've already created and deployed a cube in SSAS Multi-dimensional.  Here's how to use this as a basis for a tabular model.

First choose to import data into your model as always:

Importing from data source

Choose to import data from a data source.

Scroll down and choose a multi-dimensional data source:

Microsoft SSAS data source

Choose this option to bring data in from a cube.

Choose which server to connect to, and which cube to import:

Importing from a cube

Here I've given my connection a friendly name of MyLittleCube.

As so often, choose who you're impersonating (in this case, myself):

Impersonation setting

Here I'm logging on to the cube as myself.

 

To create an MDX query choosing what data to bring in, click on the Design button at the bottom right corner of the dialog box which appears:

Designing MDX query

You could type a query in, but it's easier to get SSAS to do the hard work.

 

Build your query by dragging fields from the left into the query designer:

Designing a query

Here we're showing total sales by species.

When you choose OK, you'll get an MDX query generated:

MDX query

The MDX generated for this query.

 

You can now finish the wizard to import the data into your tabular model.

Importing data from a SSAS Tabular

You can import data from one tabular model into another, in the same way as for a multi-dimensional import as shown above. 

The reason the procedure is the same is that when you deploy an SSAS tabular model you create a cube in the Analysis Services database.

Start by importing from a data source:

Importing data source

Choose this option as usual.

 

Choose a multi-dimensional data source, even though that isn't actually what you want to import:

Importing a tabular model

Choose this option, even though you want to import from a tabular model.

 

Choose the server you want to link to, and the tabular model (exposed as a cube) from which you want to import data:

Tabular model import

Here we're importing from a model called BaseModel.

Choose to impersonate yourself, or choose a SQL Server account:

Impersonation option

Here I'm connecting to the tabular model as myself.

 

Type in a valid DAX query (even though this is an MDX dialog box!):

DAX query

Here we're just listing out the transactions.

 

When you finish the wizard, the data will be imported into your model.

Although you can't use the Design button in this wizard to write your DAX, the Validate button will work.

For the final part of this tutorial on importing data into tabular models, I'll have a quick look at the other possible data sources. 

This blog has 0 threads Add post