WiseOwl Training - Established 1992 Wise Owl Training

Established May 1992
30 years in business
Wise Owl Training
30 years in business
See 479 reviews for our classroom and online training
How to get data from tabular models using DAX queries in various programs
Part six of a six-part series of blogs

Knowing how to write DAX queries is one thing, but where are you going to use them? This blog shows how you can integrate DAX queries into SSMS, SSRS, SSIS, Excel and PowerPivot.

  1. Using DAX queries in SQL Server and other applications
  2. Running DAX queries within Management Studio
  3. Basing SSRS (Reporting Services) reports on DAX queries
  4. Writing DAX queries in Integration Services (SSIS)
  5. Retrieving data into Excel using DAX queries
  6. Loading data into PowerPivot data models using DAX queries (this blog)

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 18 February 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.

Loading data into PowerPivot data models using DAX queries

This page shows how to import data into a PowerPivot data model by running a DAX query.

Once more, I'm assuming that readers already know PowerPivot.  If you don't, a quick guide to using PowerPivot for tabular model users is covered in this blog.  Alternatively, you could watch my YouTube tutorials, or attend a Wise Owl PowerPivot course.

Starting to load data

From Excel, go into PowerPivot and choose to import data as follows:

Importing from Analysis Services

Choose to import data from Analysis Services.

Choose a server (I've gone for .\sql2012, but yours will be different):

Choosing a server

Type in the name of your server.

Further down in the same dialog box, you can now choose the model from which you want to extract data:

Choosing a model

We'll take data from our tutorial model.

Pasting or typing in the DAX query

On the next step of the Table Import Wizard, you can type or paste in your DAX query:

Table import wizard - dax query

Here I've not only typed (OK, pasted) in a DAX query, but I've clicked on the Validate button (not shown in the diagram) to check it's OK. Reassuringly, PowerPivot tells me that my MDX statement is valid, even though it isn't actually an MDX statement!


PowerPivot now loads the data just like for any other table:

The PowerPivot data

The results of running the DAX query shown above.

You can obviously use the same trick to import data into PowerPivot from an Analysis Services multi-dimensional model cube, using MDX.

And with that, I have run out of applications in which to use DAX queries!

This blog has 0 threads Add post